Completed
Pull Request — master (#104)
by Thibaud
02:39
created
src/Resource/Teleporter/AbstractTeleporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         $target = $this->getTarget($context, $resource);
33 33
 
34
-        if (! file_exists(dirname($target)) && false === mkdir(dirname($target))) {
34
+        if (!file_exists(dirname($target)) && false === mkdir(dirname($target))) {
35 35
             throw new IOException(sprintf('Could not create parent directory %s', dirname($target)));
36 36
         }
37 37
 
Please login to merge, or discard this patch.
src/Resource/TeleporterContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     private function getTeleporter($typeName)
66 66
     {
67
-        if (! isset($this->teleporters[$typeName])) {
67
+        if (!isset($this->teleporters[$typeName])) {
68 68
             $factory = $this->factories[$typeName];
69 69
             $this->teleporters[$typeName] = $factory();
70 70
         }
@@ -81,16 +81,16 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $container = new static();
83 83
 
84
-        $container->factories['stream-teleporter'] = function () {
84
+        $container->factories['stream-teleporter'] = function() {
85 85
             return StreamTeleporter::create();
86 86
         };
87 87
 
88
-        $container->factories['local-teleporter'] = function () {
88
+        $container->factories['local-teleporter'] = function() {
89 89
             return LocalTeleporter::create();
90 90
         };
91 91
 
92 92
         if (class_exists('Guzzle\Http\Client')) {
93
-            $container->factories['guzzle-teleporter'] = function () {
93
+            $container->factories['guzzle-teleporter'] = function() {
94 94
                 return GuzzleTeleporter::create();
95 95
             };
96 96
         }
Please login to merge, or discard this patch.
src/Adapter/AbstractAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,6 +247,6 @@
 block discarded – undo
247 247
             throw new InvalidArgumentException(sprintf('Target path %s is not writeable.', $directory));
248 248
         }
249 249
 
250
-        return realpath($directory).'/'.PathUtil::basename($path);
250
+        return realpath($directory) . '/' . PathUtil::basename($path);
251 251
     }
252 252
 }
Please login to merge, or discard this patch.
src/Resource/Resource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             return null;
88 88
         }
89 89
 
90
-        if (PathUtil::basename($this->original)  === $this->target) {
90
+        if (PathUtil::basename($this->original) === $this->target) {
91 91
             return dirname($this->original);
92 92
         }
93 93
     }
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.