Skip to content

Commit

Permalink
phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
bfanger committed Jun 19, 2018
1 parent 5be8cb7 commit 7131e48
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Util/ExportPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public function generateContent()
$repo = Repository::instance();
$lastPosts = $repo->allPosts(['AND', 'status !=' => 'auto-draft', 'type !=' => 'revision'])->orderByDescending('id')->take(25);
$options = $lastPosts->select(function ($post) {
return $post->id.') '.$post->type.' - '.$post->slug;
}, 'id')->toArray();
return $post->id.') '.$post->type.' - '.$post->slug;
}, 'id')->toArray();
\Sledgehammer\array_key_unshift($options, 'custom', 'Custom ID');
$form = new Form([
'method' => 'GET',
Expand Down
3 changes: 1 addition & 2 deletions src/Util/ExportTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function generateContent()
$lastPosts = $repo->allTaxonomies()->orderByDescending('id')->take(25); //['AND', 'status !=' => 'auto-draft', 'type !=' => 'revision']
$options = $lastPosts->select(function ($taxonomy) {
return $taxonomy->id.') '.$taxonomy->taxonomy.' - '.$taxonomy->term->name;
}, 'id')->toArray();
}, 'id')->toArray();
\Sledgehammer\array_key_unshift($options, 'custom', 'Custom ID');
$form = new Form([
'method' => 'GET',
Expand Down Expand Up @@ -90,5 +90,4 @@ public function generateContent()

return $form;
}

}
12 changes: 6 additions & 6 deletions templates/diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Sledgehammer\Core\Html;
use Sledgehammer\Core\Json;

if ($changes): ?>
if ($changes) : ?>
<table class="table">
<thead>
<tr>
Expand All @@ -13,7 +13,7 @@
</tr>
</thead>
<tbody>
<?php foreach ($changes as $key => $change): ?>
<?php foreach ($changes as $key => $change) : ?>
<tr>
<td style="white-space: nowrap"><?= Html::escape($key) ?></td>
<td style="max-width: 44vw"><?php
Expand All @@ -29,7 +29,7 @@
</tbody>
</table>
<?php endif;
if ($added): ?>
if ($added) : ?>
<table class="table" style="width: auto">
<thead>
<tr>
Expand All @@ -38,7 +38,7 @@
</tr>
</thead>
<tbody>
<?php foreach ($added as $key => $value): ?>
<?php foreach ($added as $key => $value) : ?>
<tr>
<td><?= Html::escape($key); ?></td>
<td style="max-width: 100em"><?php
Expand All @@ -52,15 +52,15 @@
</tbody>
</table>
<?php endif;
if ($removed): ?>
if ($removed) : ?>
<table class="table" style="width: auto;">
<thead>
<tr>
<th>Option removed</th>
</tr>
</thead>
<tbody>
<?php foreach ($removed as $key => $value): ?>
<?php foreach ($removed as $key => $value) : ?>
<tr>
<td><?= Html::escape($key); ?></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion utils/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
Framework::initModule($moduleDir . 'wordpress');
require_once($projectDir . '/web/wp-config.php');

Sledgehammer\Wordpress\init();
Sledgehammer\Wordpress\init();

0 comments on commit 7131e48

Please sign in to comment.