Completed
Pull Request — master (#28)
by Tom
02:45
created
src/Config.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     /**
23 23
      * @api
24 24
      *
25
-     * @param array  $patterns
25
+     * @param string[]  $patterns
26 26
      * @param string $separator
27 27
      *
28 28
      * @return self
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         if (empty($files)) {
36 36
             throw new NoMatchingFilesException(
37
-                'No files found matching patterns: ' . implode(', ', $patterns)
37
+                'No files found matching patterns: '.implode(', ', $patterns)
38 38
             );
39 39
         }
40 40
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         ]);
45 45
 
46 46
         $configs = array_map(
47
-            function ($filename) use ($factory) {
47
+            function($filename) use ($factory) {
48 48
                 $reader = $factory->create($filename);
49 49
                 return $reader->read($filename);
50 50
             },
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         foreach ($path as $node) {
123 123
             if (!is_array($pointer) || !array_key_exists($node, $pointer)) {
124
-                throw new EntryDoesNotExistException("No entry found for " . implode($this->separator, $path));
124
+                throw new EntryDoesNotExistException("No entry found for ".implode($this->separator, $path));
125 125
             }
126 126
 
127 127
             $pointer = &$pointer[$node];
Please login to merge, or discard this patch.
src/ConfigServiceProvider.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * @api
31 31
      *
32
-     * @param array|Config $config
32
+     * @param Config $config
33 33
      * @param array        $settings
34 34
      *
35 35
      * @return ConfigServiceProvider
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * @param string $name
143 143
      * @param array  $settings
144
-     * @param mixed  $default
144
+     * @param string  $default
145 145
      *
146 146
      * @return mixed
147 147
      */
Please login to merge, or discard this patch.
src/League/Configurator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /**
20 20
      * @internal
21 21
      *
22
-     * @return ServiceProviderInterface
22
+     * @return ConfigServiceProvider
23 23
      */
24 24
     public function getServiceProvider()
25 25
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace TomPHP\ConfigServiceProvider\League;
4 4
 
5
-use TomPHP\ConfigServiceProvider\ContainerConfigurator;
6 5
 use TomPHP\ConfigServiceProvider\Config;
7
-use League\Container\ServiceProvider\AbstractServiceProvider;
6
+use TomPHP\ConfigServiceProvider\ContainerConfigurator;
8 7
 
9 8
 final class Configurator implements ContainerConfigurator
10 9
 {
Please login to merge, or discard this patch.
src/League/ConfigServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
         $this->prefix   = $prefix;
28 28
         $this->config   = $config;
29 29
         $this->provides = array_map(
30
-            function ($key) {
31
-                return $this->keyPrefix() . $key;
30
+            function($key) {
31
+                return $this->keyPrefix().$key;
32 32
             },
33 33
             $config->getKeys()
34 34
         );
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $prefix    = $this->keyPrefix();
42 42
 
43 43
         foreach ($iterator as $key => $value) {
44
-            $this->getContainer()->share($prefix . $key, function () use ($value) {
44
+            $this->getContainer()->share($prefix.$key, function() use ($value) {
45 45
                 return $value;
46 46
             });
47 47
         }
@@ -56,6 +56,6 @@  discard block
 block discarded – undo
56 56
             return '';
57 57
         }
58 58
 
59
-        return $this->prefix . $this->config->getSeparator();
59
+        return $this->prefix.$this->config->getSeparator();
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
src/DIConfigServiceProvider.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use League\Container\Definition\ClassDefinition;
6 6
 use League\Container\ServiceProvider\AbstractServiceProvider;
7
-use League\Container\ServiceProvider\BootableServiceProviderInterface;
8 7
 use TomPHP\ConfigServiceProvider\Exception\NotClassDefinitionException;
9 8
 
10 9
 final class DIConfigServiceProvider extends AbstractServiceProvider
Please login to merge, or discard this patch.
src/ServiceConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function getKeys()
26 26
     {
27 27
         return array_map(
28
-            function (ServiceDefinition $definition) {
28
+            function(ServiceDefinition $definition) {
29 29
                 return $definition->getKey();
30 30
             },
31 31
             $this->config
Please login to merge, or discard this patch.