Passed
Push — master ( 4db453...5dff82 )
by Kirill
07:15 queued 11s
created
src/Config/src/Loader/DirectoryLoader.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function has(string $section): bool
39 39
     {
40
-        foreach ($this->loaderExtensions() as $extension) {
40
+        foreach ($this->loaderExtensions() as $extension){
41 41
             $filename = sprintf('%s/%s.%s', $this->directory, $section, $extension);
42
-            if (file_exists($filename)) {
42
+            if (file_exists($filename)){
43 43
                 return true;
44 44
             }
45 45
         }
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function load(string $section): array
54 54
     {
55
-        foreach ($this->loaderExtensions() as $extension) {
55
+        foreach ($this->loaderExtensions() as $extension){
56 56
             $filename = sprintf('%s/%s.%s', $this->directory, $section, $extension);
57
-            if (!file_exists($filename)) {
57
+            if (!file_exists($filename)){
58 58
                 continue;
59 59
             }
60 60
 
61
-            try {
61
+            try{
62 62
                 return $this->getLoader($extension)->loadFile($section, $filename);
63
-            } catch (LoaderException $e) {
63
+            }catch (LoaderException $e){
64 64
                 throw new LoaderException("Unable to load config `{$section}`: {$e->getMessage()}", $e->getCode(), $e);
65 65
             }
66 66
         }
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,9 +37,11 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function has(string $section): bool
39 39
     {
40
-        foreach ($this->loaderExtensions() as $extension) {
40
+        foreach ($this->loaderExtensions() as $extension)
41
+        {
41 42
             $filename = sprintf('%s/%s.%s', $this->directory, $section, $extension);
42
-            if (file_exists($filename)) {
43
+            if (file_exists($filename))
44
+            {
43 45
                 return true;
44 46
             }
45 47
         }
@@ -52,15 +54,20 @@  discard block
 block discarded – undo
52 54
      */
53 55
     public function load(string $section): array
54 56
     {
55
-        foreach ($this->loaderExtensions() as $extension) {
57
+        foreach ($this->loaderExtensions() as $extension)
58
+        {
56 59
             $filename = sprintf('%s/%s.%s', $this->directory, $section, $extension);
57
-            if (!file_exists($filename)) {
60
+            if (!file_exists($filename))
61
+            {
58 62
                 continue;
59 63
             }
60 64
 
61
-            try {
65
+            try
66
+            {
62 67
                 return $this->getLoader($extension)->loadFile($section, $filename);
63
-            } catch (LoaderException $e) {
68
+            }
69
+            catch (LoaderException $e)
70
+            {
64 71
                 throw new LoaderException("Unable to load config `{$section}`: {$e->getMessage()}", $e->getCode(), $e);
65 72
             }
66 73
         }
Please login to merge, or discard this patch.