From 7131e48c12ac2f27750c004e799eff3fb497f75c Mon Sep 17 00:00:00 2001 From: Bob Fanger Date: Tue, 19 Jun 2018 18:15:12 +0200 Subject: [PATCH] phpcbf --- src/Util/ExportPost.php | 4 ++-- src/Util/ExportTaxonomy.php | 3 +-- templates/diff.php | 12 ++++++------ utils/bootstrap.php | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Util/ExportPost.php b/src/Util/ExportPost.php index 14901a0..62eb169 100644 --- a/src/Util/ExportPost.php +++ b/src/Util/ExportPost.php @@ -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', diff --git a/src/Util/ExportTaxonomy.php b/src/Util/ExportTaxonomy.php index 8af1c01..ab30e99 100644 --- a/src/Util/ExportTaxonomy.php +++ b/src/Util/ExportTaxonomy.php @@ -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', @@ -90,5 +90,4 @@ public function generateContent() return $form; } - } diff --git a/templates/diff.php b/templates/diff.php index 2bfe560..f3cd848 100644 --- a/templates/diff.php +++ b/templates/diff.php @@ -3,7 +3,7 @@ use Sledgehammer\Core\Html; use Sledgehammer\Core\Json; -if ($changes): ?> +if ($changes) : ?> @@ -13,7 +13,7 @@ - $change): ?> + $change) : ?>
+if ($added) : ?> @@ -38,7 +38,7 @@ - $value): ?> + $value) : ?>
+if ($removed) : ?> @@ -60,7 +60,7 @@ - $value): ?> + $value) : ?> diff --git a/utils/bootstrap.php b/utils/bootstrap.php index 03478a7..f25fbad 100644 --- a/utils/bootstrap.php +++ b/utils/bootstrap.php @@ -10,4 +10,4 @@ Framework::initModule($moduleDir . 'wordpress'); require_once($projectDir . '/web/wp-config.php'); -Sledgehammer\Wordpress\init(); \ No newline at end of file +Sledgehammer\Wordpress\init();