@@ -85,7 +85,7 @@ |
||
| 85 | 85 | */ |
| 86 | 86 | public function readDirRaw(string $path): array |
| 87 | 87 | { |
| 88 | - $iterator = new DirectoryIterator($path); |
|
| 88 | + $iterator = new DirectoryIterator($path); |
|
| 89 | 89 | |
| 90 | 90 | $contents = []; |
| 91 | 91 | foreach ($iterator as $fileInfo) { |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | return array_values( |
| 116 | 116 | array_filter( |
| 117 | 117 | array_unique($dirContent), |
| 118 | - function ($v) { |
|
| 118 | + function($v) { |
|
| 119 | 119 | return $v !== ''; |
| 120 | 120 | }, |
| 121 | 121 | ARRAY_FILTER_USE_BOTH |
@@ -63,14 +63,14 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | $path = $this->sanitizeFilePath($path); |
| 65 | 65 | |
| 66 | - return $this->fileExistsRaw($path) && ! $this->linkExists($path); |
|
| 66 | + return $this->fileExistsRaw($path) && !$this->linkExists($path); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | public function getFileCreationTimestamp(string $path): int |
| 70 | 70 | { |
| 71 | 71 | $path = $this->sanitizeFilePath($path); |
| 72 | 72 | |
| 73 | - if (! $this->fileExists($path)) { |
|
| 73 | + if (!$this->fileExists($path)) { |
|
| 74 | 74 | throw new FileNotFoundException("File not found: '$path'"); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | $path = $this->sanitizeFilePath($path); |
| 83 | 83 | |
| 84 | - if (! $this->fileExists($path)) { |
|
| 84 | + if (!$this->fileExists($path)) { |
|
| 85 | 85 | throw new FileNotFoundException("File not found: '$path'"); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $dirPath = dirname($path); |
| 100 | - if (! $this->dirExists($dirPath)) { |
|
| 100 | + if (!$this->dirExists($dirPath)) { |
|
| 101 | 101 | $this->createDir($dirPath); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $sourcePath = $this->sanitizeFilePath($sourcePath); |
| 110 | 110 | $destinationPath = $this->sanitizeFilePath($destinationPath); |
| 111 | 111 | |
| 112 | - if (! $this->fileExists($sourcePath)) { |
|
| 112 | + if (!$this->fileExists($sourcePath)) { |
|
| 113 | 113 | throw new FileNotFoundException("File not found: '$sourcePath'"); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | $dirPath = dirname($destinationPath); |
| 125 | - if (! $this->dirExists($dirPath)) { |
|
| 125 | + if (!$this->dirExists($dirPath)) { |
|
| 126 | 126 | $this->createDir($dirPath); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | $fileExists = $this->fileExists($path); |
| 139 | 139 | |
| 140 | - if ($this->isStrictMode() && ! $fileExists) { |
|
| 140 | + if ($this->isStrictMode() && !$fileExists) { |
|
| 141 | 141 | throw new FileNotFoundException("File not found: '$path'"); |
| 142 | 142 | } |
| 143 | 143 | |
@@ -145,12 +145,12 @@ discard block |
||
| 145 | 145 | $this->deleteFileRaw($path); |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - return ! $this->fileExists($path); |
|
| 148 | + return !$this->fileExists($path); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | public function copyLink(string $path, string $toPath): bool |
| 152 | 152 | { |
| 153 | - if (! $this->linkExists($path)) { |
|
| 153 | + if (!$this->linkExists($path)) { |
|
| 154 | 154 | throw new FileNotFoundException("Link not found: '$path'"); |
| 155 | 155 | } |
| 156 | 156 | |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | public function getLinkTarget(string $path): string |
| 181 | 181 | { |
| 182 | - if (! $this->linkExists($path)) { |
|
| 182 | + if (!$this->linkExists($path)) { |
|
| 183 | 183 | throw new FileNotFoundException("Link not found: '$path'"); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | throw new PathIsDirException("The path '$path' already exists and is a dir"); |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - if (! $dirExists) { |
|
| 206 | + if (!$dirExists) { |
|
| 207 | 207 | $this->createDirRaw($path); |
| 208 | 208 | } |
| 209 | 209 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $this->deleteDirRaw($path); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - return ! $this->dirExists($path); |
|
| 226 | + return !$this->dirExists($path); |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | /** |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | { |
| 236 | 236 | $path = $this->sanitizeDirPath($path); |
| 237 | 237 | |
| 238 | - if (! $this->dirExists($path)) { |
|
| 238 | + if (!$this->dirExists($path)) { |
|
| 239 | 239 | throw new DirNotFoundException("Dir not found: '$path'"); |
| 240 | 240 | } |
| 241 | 241 | |