Completed
Branch master (1e415d)
by Andrew
02:35
created
src/Gaufrette/StreamWrapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         static::streamWrapperUnregister($scheme);
49 49
 
50
-        if (! static::streamWrapperRegister($scheme, __CLASS__)) {
50
+        if (!static::streamWrapperRegister($scheme, __CLASS__)) {
51 51
             throw new \RuntimeException(sprintf(
52 52
                 'Could not register stream wrapper class %s for scheme %s.',
53 53
                 __CLASS__,
@@ -251,11 +251,11 @@  discard block
 block discarded – undo
251 251
         $key    = substr($parts['path'], 1);
252 252
 
253 253
         if (null !== $parts['query']) {
254
-            $key.= '?' . $parts['query'];
254
+            $key .= '?'.$parts['query'];
255 255
         }
256 256
 
257 257
         if (null !== $parts['fragment']) {
258
-            $key.= '#' . $parts['fragment'];
258
+            $key .= '#'.$parts['fragment'];
259 259
         }
260 260
 
261 261
         if (empty($domain) || empty($key)) {
Please login to merge, or discard this patch.
src/Gaufrette/Util/Path.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             }
42 42
         }
43 43
 
44
-        return $prefix . implode('/', $tokens);
44
+        return $prefix.implode('/', $tokens);
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
src/Gaufrette/FilesystemMap.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 set($domain, Filesystem $filesystem)
35 35
     {
36
-        if (! preg_match('/^[-_a-zA-Z0-9]+$/', $domain)) {
36
+        if (!preg_match('/^[-_a-zA-Z0-9]+$/', $domain)) {
37 37
             throw new \InvalidArgumentException(sprintf(
38 38
                 'The specified domain "%s" is not a valid domain.',
39 39
                 $domain
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function get($domain)
70 70
     {
71
-        if (! $this->has($domain)) {
71
+        if (!$this->has($domain)) {
72 72
             throw new \InvalidArgumentException(sprintf(
73 73
                 'There is no filesystem defined for the "%s" domain.',
74 74
                 $domain
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function remove($domain)
89 89
     {
90
-        if (! $this->has($domain)) {
90
+        if (!$this->has($domain)) {
91 91
             throw new \InvalidArgumentException(sprintf(
92 92
                 'Cannot remove the "%s" filesystem as it is not defined.',
93 93
                 $domain
Please login to merge, or discard this patch.
src/Gaufrette/Filesystem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
             throw new Exception\UnexpectedFile($targetKey);
73 73
         }
74 74
 
75
-        if (! $this->adapter->rename($sourceKey, $targetKey)) {
75
+        if (!$this->adapter->rename($sourceKey, $targetKey)) {
76 76
             throw new \RuntimeException(sprintf('Could not rename the "%s" key to "%s".', $sourceKey, $targetKey));
77 77
         }
78 78
 
79
-        if($this->isFileInRegister($sourceKey)) {
79
+        if ($this->isFileInRegister($sourceKey)) {
80 80
             $this->fileRegister[$targetKey] = $this->fileRegister[$sourceKey];
81 81
             unset($this->fileRegister[$sourceKey]);
82 82
         }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
      */
289 289
     public function createFile($key)
290 290
     {
291
-        if(false === $this->isFileInRegister($key)) {
291
+        if (false === $this->isFileInRegister($key)) {
292 292
             if ($this->adapter instanceof Adapter\FileFactory) {
293 293
                 $this->fileRegister[$key] = $this->adapter->createFile($key, $this);
294 294
             } else {
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      */
333 333
     private function assertHasFile($key)
334 334
     {
335
-        if (! empty($key) && ! $this->has($key)) {
335
+        if (!empty($key) && !$this->has($key)) {
336 336
             throw new Exception\FileNotFound($key);
337 337
         }
338 338
     }
Please login to merge, or discard this patch.
src/Gaufrette/Stream/InMemoryBuffer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function __construct(Filesystem $filesystem, $key)
27 27
     {
28 28
         $this->filesystem = $filesystem;
29
-        $this->key     = $key;
29
+        $this->key = $key;
30 30
     }
31 31
 
32 32
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         $chunk = substr($this->content, $this->position, $count);
69
-        $this->position+= Util\Size::fromContent($chunk);
69
+        $this->position += Util\Size::fromContent($chunk);
70 70
 
71 71
         return $chunk;
72 72
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         } else {
92 92
             $before = substr($this->content, 0, $this->position);
93 93
             $after  = $newNumBytes > $newPosition ? substr($this->content, $newPosition) : '';
94
-            $this->content  = $before . $data . $after;
94
+            $this->content  = $before.$data.$after;
95 95
         }
96 96
 
97 97
         $this->position     = $newPosition;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function close()
105 105
     {
106
-        if (! $this->synchronized) {
106
+        if (!$this->synchronized) {
107 107
             $this->flush();
108 108
         }
109 109
     }
Please login to merge, or discard this patch.
src/Gaufrette/Stream/Local.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function read($count)
58 58
     {
59
-        if (! $this->fileHandle) {
59
+        if (!$this->fileHandle) {
60 60
             return false;
61 61
         }
62 62
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function write($data)
74 74
     {
75
-        if (! $this->fileHandle) {
75
+        if (!$this->fileHandle) {
76 76
             return false;
77 77
         }
78 78
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function close()
90 90
     {
91
-        if (! $this->fileHandle) {
91
+        if (!$this->fileHandle) {
92 92
             return false;
93 93
         }
94 94
 
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/MogileFS.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
         $domains = array();
193 193
 
194 194
         for ($i = 1; $i <= $res['domains']; $i++) {
195
-            $dom = 'domain' . $i;
195
+            $dom = 'domain'.$i;
196 196
             $classes = array();
197 197
 
198 198
             // Associate classes to current domain (class name => mindevcount)
199 199
             for ($j = 1; $j <= $res[$dom.'classes']; $j++) {
200
-                $classes[$res[$dom . 'class' . $j . 'name']] = $res[$dom . 'class' . $j . 'mindevcount'];
200
+                $classes[$res[$dom.'class'.$j.'name']] = $res[$dom.'class'.$j.'mindevcount'];
201 201
             }
202 202
 
203 203
             $domains[] = array('name' => $res[$dom], 'classes' => $classes);
@@ -337,11 +337,11 @@  discard block
 block discarded – undo
337 337
         stream_set_blocking($fp, true);
338 338
         stream_set_timeout($fp, 30, 200000);
339 339
 
340
-        $out  = "PUT ". $url['path']. " HTTP/1.1". $b;
341
-        $out .= "Host: ". $url['host']. $b;
342
-        $out .= "Content-Length: ". Util\Size::fromContent($data). $b. $b;
340
+        $out  = "PUT ".$url['path']." HTTP/1.1".$b;
341
+        $out .= "Host: ".$url['host'].$b;
342
+        $out .= "Content-Length: ".Util\Size::fromContent($data).$b.$b;
343 343
         $out .= $data;
344
-        $out .= $b. $b;
344
+        $out .= $b.$b;
345 345
         fwrite($fp, $out);
346 346
         fflush($fp);
347 347
 
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Apc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     public function rename($sourceKey, $targetKey)
110 110
     {
111 111
         // TODO: this probably allows for race conditions...
112
-        $written  = $this->write($targetKey, $this->read($sourceKey));
112
+        $written = $this->write($targetKey, $this->read($sourceKey));
113 113
         $deleted = $this->delete($sourceKey);
114 114
 
115 115
         return $written && $deleted;
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function computePath($key)
133 133
     {
134
-        return $this->prefix . $key;
134
+        return $this->prefix.$key;
135 135
     }
136 136
 
137 137
     /**
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Sftp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
      */
174 174
     protected function computePath($key)
175 175
     {
176
-        return $this->directory . '/' . ltrim($key, '/');
176
+        return $this->directory.'/'.ltrim($key, '/');
177 177
     }
178 178
 
179 179
     /**
Please login to merge, or discard this patch.