Passed
Pull Request — master (#389)
by Valentin
04:47
created
src/Boot/tests/ConfigsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $core = TestCore::init([
25 25
             'root'   => __DIR__,
26
-            'config' => __DIR__ . '/config'
26
+            'config' => __DIR__.'/config'
27 27
         ]);
28 28
 
29 29
         /** @var TestConfig $config */
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $core = TestCore::init([
38 38
             'root'   => __DIR__,
39
-            'config' => __DIR__ . '/config',
39
+            'config' => __DIR__.'/config',
40 40
         ]);
41 41
 
42 42
         /** @var ConfiguratorInterface $config */
Please login to merge, or discard this patch.
src/Boot/src/Bootloader/ConfigurationBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
     public function addLoader(string $ext, FileLoaderInterface $loader): void
61 61
     {
62
-        if (!isset($this->loaders[$ext]) || get_class($this->loaders[$ext]) !== get_class($loader)) {
62
+        if (!isset($this->loaders[$ext]) || get_class($this->loaders[$ext]) !== get_class($loader)){
63 63
             $this->loaders[$ext] = $loader;
64 64
             $this->container->bindSingleton(ConfigManager::class, $this->createConfigManager());
65 65
         }
Please login to merge, or discard this patch.
src/Config/src/Loader/DirectoryLoader.php 1 patch
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->getCode(), $e);
65 65
             }
66 66
         }
Please login to merge, or discard this patch.