Completed
Branch master (1128c5)
by Benoît
02:59
created
Category
src/Resolver/ProtocolBasedWriterResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 */
Please login to merge, or discard this patch.
src/Resolver/ProtocolBasedReaderResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 */
Please login to merge, or discard this patch.
src/ResourceUri.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.