From 6acef5f791a708b73c20c61f2d5aa3e98732afda Mon Sep 17 00:00:00 2001 From: Joseph Lyons Date: Thu, 16 Mar 2017 13:20:23 +1100 Subject: [PATCH 1/2] trailing comma not allowed --- prefill.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prefill.php b/prefill.php index b4caeec..4a7fea6 100644 --- a/prefill.php +++ b/prefill.php @@ -17,7 +17,9 @@ $fields = [ 'psr4_namespace' => ['PSR-4 namespace', 'usually, Vendor\\Package', '{package_vendor}\\{package_name}'], ]; -$values = []; +$values = [ + +]; $replacements = [ ':vendor\\\\:package_name\\\\' => function () use(&$values) { return str_replace('\\', '\\\\', $values['psr4_namespace']) . '\\\\'; }, @@ -97,7 +99,7 @@ $files = array_merge( glob(__DIR__ . '/*.xml.dist'), glob(__DIR__ . '/composer.json'), glob(__DIR__ . '/src/*.php'), - glob(__DIR__ . '/tests/*.php'), + glob(__DIR__ . '/tests/*.php') ); foreach ($files as $f) { $contents = file_get_contents($f); From e0d10abe4aacf9b304496a9f8fa78f8328aaff9b Mon Sep 17 00:00:00 2001 From: Joseph Lyons Date: Thu, 16 Mar 2017 13:23:58 +1100 Subject: [PATCH 2/2] put array back the way it was --- prefill.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/prefill.php b/prefill.php index 4a7fea6..822f88a 100644 --- a/prefill.php +++ b/prefill.php @@ -17,9 +17,7 @@ $fields = [ 'psr4_namespace' => ['PSR-4 namespace', 'usually, Vendor\\Package', '{package_vendor}\\{package_name}'], ]; -$values = [ - -]; +$values = []; $replacements = [ ':vendor\\\\:package_name\\\\' => function () use(&$values) { return str_replace('\\', '\\\\', $values['psr4_namespace']) . '\\\\'; },