From 8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Oct 2015 10:09:03 -0400 Subject: Run php-cs-fixer on the code base --- app/Console/LocaleComparator.php | 3 +-- app/Console/LocaleSync.php | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'app/Console') diff --git a/app/Console/LocaleComparator.php b/app/Console/LocaleComparator.php index fcc3a995..8e5e0904 100644 --- a/app/Console/LocaleComparator.php +++ b/app/Console/LocaleComparator.php @@ -25,7 +25,6 @@ class LocaleComparator extends Base $it->rewind(); while ($it->valid()) { - if (! $it->isDot() && substr($it->key(), -4) === '.php') { $strings = array_merge($strings, $this->search($it->key())); } @@ -72,7 +71,7 @@ class LocaleComparator extends Base $strings = array_merge($strings, $matches[1]); } - array_walk($strings, function(&$value) { + array_walk($strings, function (&$value) { $value = trim($value, "'"); $value = str_replace("\'", "'", $value); }); diff --git a/app/Console/LocaleSync.php b/app/Console/LocaleSync.php index bc3918da..d62b40b5 100644 --- a/app/Console/LocaleSync.php +++ b/app/Console/LocaleSync.php @@ -23,9 +23,7 @@ class LocaleSync extends Base $reference = include $reference_file; foreach (new DirectoryIterator('app/Locale') as $fileInfo) { - if (! $fileInfo->isDot() && $fileInfo->isDir() && $fileInfo->getFilename() !== self::REF_LOCALE) { - $filename = 'app/Locale/'.$fileInfo->getFilename().'/translations.php'; echo $fileInfo->getFilename().' ('.$filename.')'.PHP_EOL; @@ -42,11 +40,9 @@ class LocaleSync extends Base $output .= 'return array('.PHP_EOL; foreach ($reference as $key => $value) { - if (! empty($outdated[$key])) { $output .= " '".str_replace("'", "\'", $key)."' => '".str_replace("'", "\'", $outdated[$key])."',\n"; - } - else { + } else { $output .= " // '".str_replace("'", "\'", $key)."' => '',\n"; } } -- cgit v1.2.3