@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $keys = array_diff($this->required, array_keys($metadata), $ignore); |
| 112 | 112 | |
| 113 | 113 | foreach ($keys as $key) { |
| 114 | - $method = 'get' . ucfirst($key); |
|
| 114 | + $method = 'get'.ucfirst($key); |
|
| 115 | 115 | |
| 116 | 116 | try { |
| 117 | 117 | $metadata[$key] = $this->filesystem->$method($path); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | $contents = $this->filesystem->listContents($dirname); |
| 42 | 42 | |
| 43 | - if ( ! empty($contents)) { |
|
| 43 | + if (!empty($contents)) { |
|
| 44 | 44 | throw new DirectoryNotEmptyException(); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | return true; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - if ( ! $this->isValidRename($path, $newpath)) { |
|
| 44 | + if (!$this->isValidRename($path, $newpath)) { |
|
| 45 | 45 | // Returns false if a Flysystem call fails. |
| 46 | 46 | return false; |
| 47 | 47 | } |
@@ -61,17 +61,17 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | $adapter = $this->filesystem->getAdapter(); |
| 63 | 63 | |
| 64 | - if ( ! $adapter->has($source)) { |
|
| 64 | + if (!$adapter->has($source)) { |
|
| 65 | 65 | throw new FileNotFoundException($source); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $subdir = Util::dirname($dest); |
| 69 | 69 | |
| 70 | - if (strlen($subdir) && ! $adapter->has($subdir)) { |
|
| 70 | + if (strlen($subdir) && !$adapter->has($subdir)) { |
|
| 71 | 71 | throw new FileNotFoundException($source); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if ( ! $adapter->has($dest)) { |
|
| 74 | + if (!$adapter->has($dest)) { |
|
| 75 | 75 | return true; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | // Allow overwriting destination directory if not empty. |
| 114 | 114 | $contents = $this->filesystem->listContents($dest); |
| 115 | - if ( ! empty($contents)) { |
|
| 115 | + if (!empty($contents)) { |
|
| 116 | 116 | throw new DirectoryNotEmptyException(); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | return (bool) $adapter->createDir($dirname, $this->defaultConfig()); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if ( ! $adapter->has(dirname($dirname))) { |
|
| 38 | + if (!$adapter->has(dirname($dirname))) { |
|
| 39 | 39 | throw new FileNotFoundException($dirname); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | public static function unregister($protocol) |
| 182 | 182 | { |
| 183 | - if ( ! static::streamWrapperExists($protocol)) { |
|
| 183 | + if (!static::streamWrapperExists($protocol)) { |
|
| 184 | 184 | return false; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | return false; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - if ( ! $dirlen = strlen($path)) { |
|
| 275 | + if (!$dirlen = strlen($path)) { |
|
| 276 | 276 | return true; |
| 277 | 277 | } |
| 278 | 278 | |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | */ |
| 404 | 404 | public function stream_flush() |
| 405 | 405 | { |
| 406 | - if ( ! $this->needsFlush) { |
|
| 406 | + if (!$this->needsFlush) { |
|
| 407 | 407 | return true; |
| 408 | 408 | } |
| 409 | 409 | |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | case STREAM_META_ACCESS: |
| 466 | 466 | $permissions = octdec(substr(decoct($value), -4)); |
| 467 | 467 | $is_public = $permissions & $this->getConfiguration('public_mask'); |
| 468 | - $visibility = $is_public ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE; |
|
| 468 | + $visibility = $is_public ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE; |
|
| 469 | 469 | |
| 470 | 470 | try { |
| 471 | 471 | return $this->getFilesystem()->setVisibility($this->getTarget(), $visibility); |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | return $this->getFilesystem()->stat($this->getTarget(), $flags); |
| 700 | 700 | } catch (FileNotFoundException $e) { |
| 701 | 701 | // File doesn't exist. |
| 702 | - if ( ! ($flags & STREAM_URL_STAT_QUIET)) { |
|
| 702 | + if (!($flags & STREAM_URL_STAT_QUIET)) { |
|
| 703 | 703 | $this->triggerError('stat', $e); |
| 704 | 704 | } |
| 705 | 705 | } catch (\Exception $e) { |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | */ |
| 807 | 807 | protected function ensureWritableHandle() |
| 808 | 808 | { |
| 809 | - if ( ! $this->needsCowCheck) { |
|
| 809 | + if (!$this->needsCowCheck) { |
|
| 810 | 810 | return; |
| 811 | 811 | } |
| 812 | 812 | |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | */ |
| 839 | 839 | protected function getTarget($uri = null) |
| 840 | 840 | { |
| 841 | - if ( ! isset($uri)) { |
|
| 841 | + if (!isset($uri)) { |
|
| 842 | 842 | $uri = $this->uri; |
| 843 | 843 | } |
| 844 | 844 | |
@@ -944,11 +944,11 @@ discard block |
||
| 944 | 944 | // Since we're flattening out whole filesystems, at least create a |
| 945 | 945 | // sub-directory for each scheme to attempt to reduce the number of |
| 946 | 946 | // files per directory. |
| 947 | - $temp_dir = sys_get_temp_dir() . '/flysystem-stream-wrapper/' . $sub_dir; |
|
| 947 | + $temp_dir = sys_get_temp_dir().'/flysystem-stream-wrapper/'.$sub_dir; |
|
| 948 | 948 | |
| 949 | 949 | // Race free directory creation. If @mkdir() fails, fopen() will fail |
| 950 | 950 | // later, so there's no reason to test again. |
| 951 | - ! is_dir($temp_dir) && @mkdir($temp_dir, 0777, true); |
|
| 951 | + !is_dir($temp_dir) && @mkdir($temp_dir, 0777, true); |
|
| 952 | 952 | |
| 953 | 953 | // Normalize paths so that locks are consistent. |
| 954 | 954 | // We are using sha1() to avoid the file name limits, and case |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | $lock_key = sha1(Util::normalizePath($this->getTarget())); |
| 957 | 957 | |
| 958 | 958 | // Relay the lock to a real filesystem lock. |
| 959 | - return fopen($temp_dir . '/' . $lock_key, 'c'); |
|
| 959 | + return fopen($temp_dir.'/'.$lock_key, 'c'); |
|
| 960 | 960 | } |
| 961 | 961 | |
| 962 | 962 | /** |