@@ -52,7 +52,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 100 | 100 | return $this->required->getArrayCopy(); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - return (array)$this->required; |
|
| 103 | + return (array) $this->required; |
|
| 104 | 104 | } |
| 105 | 105 | } |
@@ -63,7 +63,7 @@ |
||
| 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'), |
@@ -53,7 +53,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | /** |
@@ -88,7 +88,7 @@ |
||
| 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 | |
@@ -86,7 +86,7 @@ |
||
| 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.'), |
@@ -83,7 +83,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -139,7 +139,7 @@ |
||
| 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 | } |
@@ -57,11 +57,11 @@ |
||
| 57 | 57 | try { |
| 58 | 58 | $file = array_pop($files); |
| 59 | 59 | |
| 60 | - if (! is_readable($file)) { |
|
| 60 | + if ( ! is_readable($file)) { |
|
| 61 | 61 | continue; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if (! array_key_exists($file, static::$configFilesCache)) { |
|
| 64 | + if ( ! array_key_exists($file, static::$configFilesCache)) { |
|
| 65 | 65 | static::$configFilesCache[$file] = Loader::load($file); |
| 66 | 66 | } |
| 67 | 67 | |