Completed
Branch full-rewrite (c81f4f)
by Thibaud
02:42
created
src/Adapter/Pecl/Rar/RarResourceIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      */
37 37
     protected  function buildIterator()
38 38
     {
39
-        return new MappingArrayIterator($this->archive->getEntries(), function ($current) {
39
+        return new MappingArrayIterator($this->archive->getEntries(), function($current) {
40 40
             return ResourceUri::fromString($current->getName());
41 41
         });
42 42
     }
Please login to merge, or discard this patch.
src/Adapter/Pecl/RarAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         ProtocolBasedReaderResolver $readerResolver,
22 22
         ProtocolBasedWriterResolver $writerResolver
23 23
     ) {
24
-        $iteratorResolver->addFactory('rar', function ($container) {
24
+        $iteratorResolver->addFactory('rar', function($container) {
25 25
             return new RarResourceIterator($container);
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
src/Adapter/Pecl/ZipAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         ProtocolBasedReaderResolver $readerResolver,
22 22
         ProtocolBasedWriterResolver $writerResolver
23 23
     ) {
24
-        $iteratorResolver->addFactory('zip', function ($container) {
24
+        $iteratorResolver->addFactory('zip', function($container) {
25 25
             return new ZipResourceIterator($container);
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
src/Adapter/FileAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
         $writerResolver->addWriter(new StreamWriter(), 'file');
27 27
 
28
-        $iteratorResolver->addFactory('file', function (PackagedResource $container) use ($iteratorResolver) {
28
+        $iteratorResolver->addFactory('file', function(PackagedResource $container) use ($iteratorResolver) {
29 29
             $extension = PathUtil::extractExtension($container->getRelativeUri()->getResource());
30 30
             $factory = $iteratorResolver->getFactory($extension);
31 31
 
Please login to merge, or discard this patch.
src/Adapter/Pear/TarAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         ProtocolBasedReaderResolver $readerResolver,
22 22
         ProtocolBasedWriterResolver $writerResolver
23 23
     ) {
24
-        $iteratorResolver->addFactory('tar', function ($container) {
24
+        $iteratorResolver->addFactory('tar', function($container) {
25 25
             return new TarResourceIterator($container);
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
src/Adapter/Pear/Tar/TarResourceIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     protected function buildIterator()
53 53
     {
54
-        return new MappingArrayIterator($this->archive->listContent(), function ($current) {
54
+        return new MappingArrayIterator($this->archive->listContent(), function($current) {
55 55
             return ResourceUri::fromString($current['filename']);
56 56
         });
57 57
     }
Please login to merge, or discard this patch.
src/Adapter/Guzzle/GuzzleReaderFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         $this->client = $client;
21 21
 
22
-        if (! $this->client) {
22
+        if (!$this->client) {
23 23
             $this->client = new Client();
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
src/Resource/ResourceUri.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     private static function getNonEmptyParts($uri)
15 15
     {
16
-        $nonEmptyStringFilter = function ($value) {
16
+        $nonEmptyStringFilter = function($value) {
17 17
             return $value != '';
18 18
         };
19 19
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         $parts = self::getNonEmptyParts($uri);
55 55
 
56
-        if (! self::validateResourceParts($parts)) {
56
+        if (!self::validateResourceParts($parts)) {
57 57
             return false;
58 58
         }
59 59
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function __construct($uri)
107 107
     {
108
-        if (! self::isValidUri($uri)) {
108
+        if (!self::isValidUri($uri)) {
109 109
             throw new \InvalidArgumentException(sprintf(
110 110
                 'Malformed URI: required format is "protocol://resource", got "%s"',
111 111
                 $uri
Please login to merge, or discard this patch.
src/Resource/Resolver/ProtocolBasedWriterResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function addWriter(ResourceWriter $writer, $protocols)
26 26
     {
27
-        $protocols = is_array($protocols) ? $protocols : [ $protocols ];
27
+        $protocols = is_array($protocols) ? $protocols : [$protocols];
28 28
         $index = count($this->writers);
29 29
 
30 30
         $this->writers[$index] = $writer;
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function resolveWriter(ResourceUri $resource)
44 44
     {
45
-        if (! array_key_exists($resource->getProtocol(), $this->protocolWriterIndexes)) {
46
-            throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource  . ')');
45
+        if (!array_key_exists($resource->getProtocol(), $this->protocolWriterIndexes)) {
46
+            throw new \RuntimeException('Unsupported protocol: ' . $resource->getProtocol() . '( ' . $resource . ')');
47 47
         }
48 48
 
49 49
         $index = $this->protocolWriterIndexes[$resource->getProtocol()];
Please login to merge, or discard this patch.