Passed
Push — master ( 3415df...79c576 )
by Alain
02:57
created
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.
src/AbstractConfig.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         parent::__construct($config, ArrayObject::ARRAY_AS_PROPS);
54 54
 
55 55
         if (null !== $delimiter) {
56
-            $this->delimiter = (array)$delimiter;
56
+            $this->delimiter = (array) $delimiter;
57 57
         }
58 58
     }
59 59
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             $array = $this->getArrayCopy();
104 104
             while (count($keys) > 0) {
105 105
                 $key = array_pop($keys);
106
-                if (! array_key_exists($key, $array)) {
106
+                if ( ! array_key_exists($key, $array)) {
107 107
                     return false;
108 108
                 }
109 109
                 $array = $array[$key];
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function getKeys()
137 137
     {
138
-        return array_keys((array)$this);
138
+        return array_keys((array) $this);
139 139
     }
140 140
 
141 141
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
         Assert\that($keys)->all()->string()->notEmpty();
176 176
 
177
-        if (! $this->hasKey($keys)) {
177
+        if ( ! $this->hasKey($keys)) {
178 178
             throw new OutOfRangeException(
179 179
                 sprintf(
180 180
                     _('The configuration key %1$s does not exist.'),
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         // Replace all of the configured delimiters by the first one, so that we can then use explode().
240 240
         $normalizedString = str_replace($this->delimiter, $this->delimiter[0], $keyString);
241 241
 
242
-        return (array)explode($this->delimiter[0], $normalizedString);
242
+        return (array) explode($this->delimiter[0], $normalizedString);
243 243
     }
244 244
 
245 245
     /**
Please login to merge, or discard this patch.