@@ -26,8 +26,8 @@ |
||
| 26 | 26 | $it = new \RecursiveDirectoryIterator($filename_clean, \RecursiveDirectoryIterator::SKIP_DOTS); |
| 27 | 27 | $files = new \RecursiveIteratorIterator($it, |
| 28 | 28 | \RecursiveIteratorIterator::CHILD_FIRST); |
| 29 | - foreach($files as $file) { |
|
| 30 | - if ($file->isDir()){ |
|
| 29 | + foreach ($files as $file) { |
|
| 30 | + if ($file->isDir()) { |
|
| 31 | 31 | rmdir($file->getRealPath()); |
| 32 | 32 | } else { |
| 33 | 33 | unlink($file->getRealPath()); |
@@ -181,13 +181,13 @@ |
||
| 181 | 181 | "Country-Code: ${country-code}\n" |
| 182 | 182 | EOD; |
| 183 | 183 | |
| 184 | - $language_code = $this->config->getOr('language', 'addon.default_language'); |
|
| 184 | + $language_code = $this->config->getOr('language', 'addon.default_language'); |
|
| 185 | 185 | |
| 186 | 186 | if (!$language_code) { |
| 187 | 187 | throw new \InvalidArgumentException('Nor language param and addon default_language are specified'); |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - $language_information = self::$codes[$language_code]; |
|
| 190 | + $language_information = self::$codes[$language_code]; |
|
| 191 | 191 | $po_heading = str_replace( |
| 192 | 192 | [ |
| 193 | 193 | '${code}', |
@@ -352,7 +352,7 @@ |
||
| 352 | 352 | $settingItem->addChild('type', $type); |
| 353 | 353 | if ($variants) { |
| 354 | 354 | $variantsElement = $settingItem->addChild('variants'); |
| 355 | - foreach($variants as $variant) |
|
| 355 | + foreach ($variants as $variant) |
|
| 356 | 356 | { |
| 357 | 357 | $variantElement = $variantsElement->addChild('item'); |
| 358 | 358 | $variantElement->addAttribute('id', $variant); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | public function addGenerator(AbstractGenerator $generator) |
| 19 | 19 | { |
| 20 | - switch(get_class($generator)) |
|
| 20 | + switch (get_class($generator)) |
|
| 21 | 21 | { |
| 22 | 22 | case 'generators\AddonXml\AddonXmlGenerator': |
| 23 | 23 | $this->addonXmlGenerator = $generator; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ); |
| 108 | 108 | |
| 109 | 109 | if (!empty($data['variants'])) { |
| 110 | - foreach($data['variants'] as $variation) { |
|
| 110 | + foreach ($data['variants'] as $variation) { |
|
| 111 | 111 | $this->languageGenerator |
| 112 | 112 | ->replaceLangvar( |
| 113 | 113 | LanguageGenerator::getTranslationKey( |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $key = $matches[1]; |
| 55 | 55 | $value = true; |
| 56 | 56 | |
| 57 | - switch(count($matches)) { |
|
| 57 | + switch (count($matches)) { |
|
| 58 | 58 | case 4: |
| 59 | 59 | case 5: |
| 60 | 60 | $value = $matches[3]; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $input = ''; |
| 29 | 29 | } else { |
| 30 | 30 | $pos = strpos($input, '/'); |
| 31 | - if ($pos === 0) $pos = strpos($input, '/', $pos+1); |
|
| 31 | + if ($pos === 0) $pos = strpos($input, '/', $pos + 1); |
|
| 32 | 32 | if ($pos === false) $pos = strlen($input); |
| 33 | 33 | $output .= substr($input, 0, $pos); |
| 34 | 34 | $input = (string) substr($input, $pos); |
@@ -10,9 +10,9 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * autoload |
| 12 | 12 | */ |
| 13 | -spl_autoload_register(function ($class) { |
|
| 13 | +spl_autoload_register(function($class) { |
|
| 14 | 14 | $file = realpath(__DIR__ . '/' . 'app') . '/' . str_replace('\\', '/', $class) . '.php'; |
| 15 | - if(file_exists($file)) { |
|
| 15 | + if (file_exists($file)) { |
|
| 16 | 16 | require_once($file); |
| 17 | 17 | } |
| 18 | 18 | }); |
@@ -228,7 +228,7 @@ |
||
| 228 | 228 | |
| 229 | 229 | public function setSettingsItemAutocomplete() |
| 230 | 230 | { |
| 231 | - $generator = $this->mfGenerator |
|
| 231 | + $generator = $this->mfGenerator |
|
| 232 | 232 | ->find(AddonXmlGenerator::class) |
| 233 | 233 | ->extract(); |
| 234 | 234 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $self->set($key, $setting); |
| 14 | 14 | }); |
| 15 | 15 | |
| 16 | - foreach($arguments as $key => $value) { |
|
| 16 | + foreach ($arguments as $key => $value) { |
|
| 17 | 17 | $this->set($key, $value); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | public function getOr(string ...$keys) |
| 37 | 37 | { |
| 38 | - foreach($keys as $key) { |
|
| 38 | + foreach ($keys as $key) { |
|
| 39 | 39 | $value = $this->get($key); |
| 40 | 40 | |
| 41 | 41 | if ($value) { |