Passed
Push — master ( 630e5e...94c8c0 )
by Alain
03:20
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/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.
src/Loader/LoaderFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     public static function getLoader($loaderClass)
89 89
     {
90 90
         try {
91
-            if (! array_key_exists($loaderClass, static::$loaderInstances)) {
91
+            if ( ! array_key_exists($loaderClass, static::$loaderInstances)) {
92 92
                 static::$loaderInstances[$loaderClass] = new $loaderClass;
93 93
             }
94 94
 
Please login to merge, or discard this patch.
src/Loader/PHPLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      */
87 87
     protected function validateUri($uri)
88 88
     {
89
-        if (! is_readable($uri)) {
89
+        if ( ! is_readable($uri)) {
90 90
             throw new FailedToLoadConfigException(
91 91
                 sprintf(
92 92
                     _('The requested PHP config file "%1$s" does not exist or is not readable.'),
Please login to merge, or discard this patch.
src/ConfigFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
             try {
49 49
                 $file = array_pop($files);
50 50
 
51
-                if (! is_readable($file)) {
51
+                if ( ! is_readable($file)) {
52 52
                     continue;
53 53
                 }
54 54
 
55
-                $data = (array)Loader::load($file);
55
+                $data = (array) Loader::load($file);
56 56
 
57 57
                 $config = static::createFromArray($data);
58 58
 
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->validator = $validator;
84 84
 
85 85
         // Make sure $config is either a string or array.
86
-        if (! (is_string($config) || is_array($config))) {
86
+        if ( ! (is_string($config) || is_array($config))) {
87 87
             throw new InvalidConfigurationSourceException(
88 88
                 sprintf(
89 89
                     _('Invalid configuration source: %1$s'),
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         }
114 114
 
115 115
         // Finally, validate the resulting config.
116
-        if (! $this->isValid()) {
116
+        if ( ! $this->isValid()) {
117 117
             throw new InvalidConfigException(
118 118
                 sprintf(
119 119
                     _('ConfigInterface file is not valid: %1$s'),
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     protected function resolveOptions($config)
154 154
     {
155
-        if (! $this->schema) {
155
+        if ( ! $this->schema) {
156 156
             return $config;
157 157
         }
158 158
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         $defaults = $this->schema->getDefaultOptions();
194 194
         $required = $this->schema->getRequiredOptions();
195 195
 
196
-        if (! $defined && ! $defaults && ! $required) {
196
+        if ( ! $defined && ! $defaults && ! $required) {
197 197
             return false;
198 198
         }
199 199
 
Please login to merge, or discard this patch.
src/ConfigTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
     {
140 140
         $configFile = method_exists($this, 'getDefaultConfigFile')
141 141
             ? $this->getDefaultConfigFile()
142
-            : __DIR__ . '/../config/defaults.php';
142
+            : __DIR__.'/../config/defaults.php';
143 143
 
144 144
         return $this->fetchConfig($configFile);
145 145
     }
Please login to merge, or discard this patch.