@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function addWriter(ResourceWriter $writer, $protocols) |
35 | 35 | { |
36 | - $protocols = is_array($protocols) ? $protocols : [ $protocols ]; |
|
36 | + $protocols = is_array($protocols) ? $protocols : [$protocols]; |
|
37 | 37 | $index = count($this->writers); |
38 | 38 | |
39 | 39 | $this->writers[$index] = $writer; |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function resolveWriter(ResourceUri $resource) |
53 | 53 | { |
54 | - if (! array_key_exists($resource->getProtocol(), $this->protocolWriterIndexes)) { |
|
55 | - throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource . ')'); |
|
54 | + if (!array_key_exists($resource->getProtocol(), $this->protocolWriterIndexes)) { |
|
55 | + throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource . ')'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** @var int $index */ |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function addFactory(ResourceReaderFactory $factory, $protocols) |
36 | 36 | { |
37 | - $protocols = is_array($protocols) ? $protocols : [ $protocols ]; |
|
37 | + $protocols = is_array($protocols) ? $protocols : [$protocols]; |
|
38 | 38 | $index = count($this->factories); |
39 | 39 | |
40 | 40 | $this->factories[$index] = $factory; |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function resolveReader(ResourceUri $resource) |
54 | 54 | { |
55 | - if (! array_key_exists($resource->getProtocol(), $this->protocolFactoryIndexes)) { |
|
56 | - throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource . ')'); |
|
55 | + if (!array_key_exists($resource->getProtocol(), $this->protocolFactoryIndexes)) { |
|
56 | + throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource . ')'); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** @var int $factoryIndex */ |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | private static function getNonEmptyParts($uri) |
24 | 24 | { |
25 | - $nonEmptyStringFilter = function ($value) { |
|
25 | + $nonEmptyStringFilter = function($value) { |
|
26 | 26 | return $value != ''; |
27 | 27 | }; |
28 | 28 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $parts = self::getNonEmptyParts($uri); |
64 | 64 | |
65 | - if (! self::validateResourceParts($parts)) { |
|
65 | + if (!self::validateResourceParts($parts)) { |
|
66 | 66 | return false; |
67 | 67 | } |
68 | 68 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function __construct($uri) |
116 | 116 | { |
117 | - if (! self::isValidUri($uri)) { |
|
117 | + if (!self::isValidUri($uri)) { |
|
118 | 118 | throw new \InvalidArgumentException(sprintf( |
119 | 119 | 'Malformed URI: required format is "protocol://resource", got "%s"', |
120 | 120 | $uri |