Passed
Push — 4.9 ( f2fdac...664e73 )
by Mikhail
01:59
created
app/filesystem/Filesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
app/generators/Language/LanguageGenerator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -181,13 +181,13 @@
 block discarded – undo
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}',
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@
 block discarded – undo
7 7
 use mediators\AbstractMediator;
8 8
 
9 9
 /**
10
-  * @property string FILENAME
11
-  * @property string $templatePath
12
-  * @property string $recycleBin - buffer to which be removed all langvars from actual content
13
-  * @property string $content
14
-  * @property Config $config
15
-  * @property AbstractMediator $mediator
16
-  * @property array $codes
17
-  * @property string $eol - end of line char
18
-  * @todo add all $codes supported by cs-cart
19
-  */
10
+ * @property string FILENAME
11
+ * @property string $templatePath
12
+ * @property string $recycleBin - buffer to which be removed all langvars from actual content
13
+ * @property string $content
14
+ * @property Config $config
15
+ * @property AbstractMediator $mediator
16
+ * @property array $codes
17
+ * @property string $eol - end of line char
18
+ * @todo add all $codes supported by cs-cart
19
+ */
20 20
 final class LanguageGenerator extends \generators\AbstractGenerator
21 21
 {
22 22
     const FILENAME = 'var/langs/${lang}/addons/${addon}.po';
Please login to merge, or discard this patch.
app/generators/AddonXml/AddonXmlGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -352,7 +352,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/mediators/GeneratorMediator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
app/helpers/string.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
app/helpers/file.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,19 +9,19 @@
 block discarded – undo
9 9
         if (
10 10
             ($prefix = substr($input, 0, 3)) == '../' ||
11 11
             ($prefix = substr($input, 0, 2)) == './'
12
-           ) {
12
+            ) {
13 13
             $input = substr($input, strlen($prefix));
14 14
         } else if (
15 15
             ($prefix = substr($input, 0, 3)) == '/./' ||
16 16
             ($prefix = $input) == '/.'
17
-           ) {
17
+            ) {
18 18
             $input = '/' . substr($input, strlen($prefix));
19 19
         } else
20 20
 
21 21
         if (
22 22
             ($prefix = substr($input, 0, 4)) == '/../' ||
23 23
             ($prefix = $input) == '/..'
24
-           ) {
24
+            ) {
25 25
             $input = '/' . substr($input, strlen($prefix));
26 26
             $output = substr($output, 0, strrpos($output, '/'));
27 27
         } else if ($input == '.' || $input == '..') {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
ccg.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@
 block discarded – undo
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
 });
Please login to merge, or discard this patch.
app/controllers/AddonXml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.