Completed
Pull Request — master (#104)
by Thibaud
03:23
created
src/Resource/Teleporter/LocalTeleporter.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use Alchemy\Zippy\Exception\IOException;
16 16
 use Alchemy\Zippy\Exception\InvalidArgumentException;
17 17
 use Alchemy\Zippy\Resource\ResourceLocator;
18
-use Alchemy\Zippy\Resource\TargetLocator;
19 18
 use Symfony\Component\Filesystem\Filesystem;
20 19
 use Symfony\Component\Filesystem\Exception\IOException as SfIOException;
21 20
 
Please login to merge, or discard this patch.
src/Resource/Reader/Stream/StreamReader.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
     public function getContentsAsStream()
35 35
     {
36 36
         $stream = is_resource($this->resource->getOriginal()) ?
37
-            $this->resource->getOriginal() :
38
-            @fopen($this->resource->getOriginal(), 'rb');
37
+            $this->resource->getOriginal() : @fopen($this->resource->getOriginal(), 'rb');
39 38
 
40 39
         return $stream;
41 40
     }
Please login to merge, or discard this patch.
src/Resource/Reader/Guzzle/LegacyGuzzleReaderFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
     {
22 22
         $this->client = $client;
23 23
 
24
-        if (! $this->client) {
24
+        if (!$this->client) {
25 25
             $this->client = new Client();
26 26
 
27
-            $this->client->getEventDispatcher()->addListener('request.error', function (Event $event) {
27
+            $this->client->getEventDispatcher()->addListener('request.error', function(Event $event) {
28 28
                 // override guzzle default behavior of throwing exceptions
29 29
                 // when 4xx & 5xx responses are encountered
30 30
                 $event->stopPropagation();
Please login to merge, or discard this patch.
src/Resource/Reader/Guzzle/LegacyGuzzleReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function getContentsAsStream()
52 52
     {
53
-        if (! $this->stream) {
53
+        if (!$this->stream) {
54 54
             $this->stream = $this->buildRequest()->send()->getBody(false);
55 55
         }
56 56
 
Please login to merge, or discard this patch.
src/Resource/Reader/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/TeleporterContainer.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     private function getTeleporter($typeName)
67 67
     {
68
-        if (! isset($this->teleporters[$typeName])) {
68
+        if (!isset($this->teleporters[$typeName])) {
69 69
             $factory = $this->factories[$typeName];
70 70
             $this->teleporters[$typeName] = $factory();
71 71
         }
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $container = new static();
84 84
 
85
-        $container->factories['stream-teleporter'] = function () {
85
+        $container->factories['stream-teleporter'] = function() {
86 86
             return StreamTeleporter::create();
87 87
         };
88 88
 
89
-        $container->factories['local-teleporter'] = function () {
89
+        $container->factories['local-teleporter'] = function() {
90 90
             return LocalTeleporter::create();
91 91
         };
92 92
 
93 93
         if (class_exists('GuzzleHttp\Client')) {
94
-            $container->factories['guzzle-teleporter'] = function () {
94
+            $container->factories['guzzle-teleporter'] = function() {
95 95
                 return new GuzzleTeleporter(
96 96
                     null,
97 97
                     new GuzzleReaderFactory(),
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             };
101 101
         }
102 102
         elseif (class_exists('Guzzle\Http\Client')) {
103
-            $container->factories['guzzle-teleporter'] = function () {
103
+            $container->factories['guzzle-teleporter'] = function() {
104 104
                 return new GuzzleTeleporter();
105 105
             };
106 106
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@
 block discarded – undo
98 98
                     new ResourceLocator()
99 99
                 );
100 100
             };
101
-        }
102
-        elseif (class_exists('Guzzle\Http\Client')) {
101
+        } elseif (class_exists('Guzzle\Http\Client')) {
103 102
             $container->factories['guzzle-teleporter'] = function () {
104 103
                 return new GuzzleTeleporter();
105 104
             };
Please login to merge, or discard this patch.