@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Compolomus\BinaryFileStorage; |
| 4 | 4 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $dir; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - public function check(array $input): ?array |
|
| 38 | + public function check(array $input): ? array |
|
| 39 | 39 | { |
| 40 | 40 | if (\count($input)) { |
| 41 | 41 | return $this->add($this->upload->process($input)); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | $result = []; |
| 65 | 65 | array_map( |
| 66 | - function (File $file) use ($result) { |
|
| 66 | + function(File $file) use ($result) { |
|
| 67 | 67 | $data = $file->getData(); |
| 68 | 68 | $md5 = $data['md5']; |
| 69 | 69 | $dir = $this->createDir($md5); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $alpha = [" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"]; |
| 93 | 93 | return $size ? \round($size / \pow(1024, ($iterator = \floor(\log($size, 1024)))), |
| 94 | - 2) . $alpha[(int)$iterator] : '0 Bytes'; |
|
| 94 | + 2) . $alpha[(int) $iterator] : '0 Bytes'; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | public function dirName(string $file): string |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $this->config['secondDirLen']); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - public function getInfoFile(string $file): ?array |
|
| 104 | + public function getInfoFile(string $file): ? array |
|
| 105 | 105 | { |
| 106 | 106 | $fileName = $this->dirName($file) . DIRECTORY_SEPARATOR . $file . '.json'; |
| 107 | 107 | return \is_file($fileName) ? \json_decode(\file_get_contents($fileName), true) : null; |