@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @param string|array $_ List of files. |
| 36 | 36 | * |
| 37 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 37 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 38 | 38 | */ |
| 39 | 39 | public static function createFromFile($_) |
| 40 | 40 | { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @param array $array Array with configuration values. |
| 78 | 78 | * |
| 79 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 79 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 80 | 80 | */ |
| 81 | 81 | public static function createFromArray(array $array) |
| 82 | 82 | { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * |
| 99 | 99 | * @param mixed $_ Array with configuration values. |
| 100 | 100 | * |
| 101 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 101 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 102 | 102 | */ |
| 103 | 103 | public static function create($_) |
| 104 | 104 | { |
@@ -48,11 +48,11 @@ |
||
| 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 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * |
| 33 | 33 | * @param string $uri URI of the resource to load. |
| 34 | 34 | * |
| 35 | - * @return array Data contained within the resource. |
|
| 35 | + * @return boolean Data contained within the resource. |
|
| 36 | 36 | */ |
| 37 | 37 | public static function canLoad($uri) |
| 38 | 38 | { |
@@ -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.'), |
@@ -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 | |
@@ -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 | |