Passed
Push — master ( 5e7e4d...3415df )
by Alain
03:49
created
src/AbstractConfig.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         parent::__construct($config, ArrayObject::ARRAY_AS_PROPS);
53 53
 
54 54
         if (null !== $delimiter) {
55
-            $this->delimiter = (array)$delimiter;
55
+            $this->delimiter = (array) $delimiter;
56 56
         }
57 57
     }
58 58
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $keys = $this->getKeyArguments(func_get_args());
75 75
         \Assert\thatAll($keys)->string()->notEmpty();
76 76
 
77
-        if (! $this->hasKey($keys)) {
77
+        if ( ! $this->hasKey($keys)) {
78 78
             throw new OutOfRangeException(
79 79
                 sprintf(
80 80
                     _('The configuration key %1$s does not exist.'),
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $array = $this->getArrayCopy();
114 114
             while (count($keys) > 0) {
115 115
                 $key = array_pop($keys);
116
-                if (! array_key_exists($key, $array)) {
116
+                if ( ! array_key_exists($key, $array)) {
117 117
                     return false;
118 118
                 }
119 119
                 $array = $array[$key];
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function getKeys()
147 147
     {
148
-        return array_keys((array)$this);
148
+        return array_keys((array) $this);
149 149
     }
150 150
 
151 151
     /**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         // Replace all of the configured delimiters by the first one, so that we can then use explode().
190 190
         $normalizedString = str_replace($this->delimiter, $this->delimiter[0], $keyString);
191 191
 
192
-        return (array)explode($this->delimiter[0], $normalizedString);
192
+        return (array) explode($this->delimiter[0], $normalizedString);
193 193
     }
194 194
 
195 195
     /**
Please login to merge, or discard this patch.
src/AbstractConfigSchema.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function getDefinedOptions()
54 54
     {
55
-        if (! $this->defined) {
55
+        if ( ! $this->defined) {
56 56
             return null;
57 57
         }
58 58
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             return $this->defined->getArrayCopy();
61 61
         }
62 62
 
63
-        return (array)$this->defined;
63
+        return (array) $this->defined;
64 64
     }
65 65
 
66 66
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function getDefaultOptions()
74 74
     {
75
-        if (! $this->defaults) {
75
+        if ( ! $this->defaults) {
76 76
             return null;
77 77
         }
78 78
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             return $this->defaults->getArrayCopy();
81 81
         }
82 82
 
83
-        return (array)$this->defaults;
83
+        return (array) $this->defaults;
84 84
     }
85 85
 
86 86
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function getRequiredOptions()
94 94
     {
95
-        if (! $this->required) {
95
+        if ( ! $this->required) {
96 96
             return null;
97 97
         }
98 98
 
@@ -100,6 +100,6 @@  discard block
 block discarded – undo
100 100
             return $this->required->getArrayCopy();
101 101
         }
102 102
 
103
-        return (array)$this->required;
103
+        return (array) $this->required;
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $this->validator = $validator;
79 79
 
80 80
         // Make sure $config is either a string or array.
81
-        if (! (is_string($config) || is_array($config))) {
81
+        if ( ! (is_string($config) || is_array($config))) {
82 82
             throw new InvalidArgumentException(
83 83
                 sprintf(
84 84
                     _('Invalid configuration source: %1$s'),
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         }
109 109
 
110 110
         // Finally, validate the resulting config.
111
-        if (! $this->isValid()) {
111
+        if ( ! $this->isValid()) {
112 112
             throw new UnexpectedValueException(
113 113
                 sprintf(
114 114
                     _('ConfigInterface file is not valid: %1$s'),
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
             throw new RuntimeException(
167 167
                 sprintf(
168 168
                     _('Loading from configuration source %1$s failed. Reason: %2$s'),
169
-                    (string)$filename,
170
-                    (string)$exception->getMessage()
169
+                    (string) $filename,
170
+                    (string) $exception->getMessage()
171 171
                 )
172 172
             );
173 173
         }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     protected function resolveOptions($config)
190 190
     {
191
-        if (! $this->schema) {
191
+        if ( ! $this->schema) {
192 192
             return $config;
193 193
         }
194 194
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         $defaults = $this->schema->getDefaultOptions();
229 229
         $required = $this->schema->getRequiredOptions();
230 230
 
231
-        if (! $defined && ! $defaults && ! $required) {
231
+        if ( ! $defined && ! $defaults && ! $required) {
232 232
             return false;
233 233
         }
234 234
 
Please login to merge, or discard this patch.
src/ConfigSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             $schema = $schema->getArrayCopy();
64 64
         }
65 65
 
66
-        if (! is_array($schema)) {
66
+        if ( ! is_array($schema)) {
67 67
             throw new InvalidArgumentException(
68 68
                 sprintf(
69 69
                     _('Invalid schema source: %1$s'),
Please login to merge, or discard this patch.