@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | /** @var string[] */ |
20 | 20 | protected static $availableLetters = ['a','b','c','d','e','f','g','h','i','j','k','l','m', |
21 | - 'n','o','p','q','r','s','t','u','v','w','x','y','z']; |
|
21 | + 'n','o','p','q','r','s','t','u','v','w','x','y','z']; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * @param int[]|string[] $input is $argv in boot time |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | const UNSORTED_PARAM = 'param_'; |
18 | 18 | |
19 | 19 | /** @var string[] */ |
20 | - protected static $availableLetters = ['a','b','c','d','e','f','g','h','i','j','k','l','m', |
|
21 | - 'n','o','p','q','r','s','t','u','v','w','x','y','z']; |
|
20 | + protected static $availableLetters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', |
|
21 | + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * @param int[]|string[] $input is $argv in boot time |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } elseif (0 === strpos(strval($posted), static::DELIMITER_SHORT_ENTRY)) { |
56 | 56 | // just by letters |
57 | 57 | $entry = $this->removeNullBytes(substr(strval($posted), strlen(static::DELIMITER_SHORT_ENTRY))); |
58 | - for ($i=0; $i<strlen($entry); $i++) { |
|
58 | + for ($i = 0; $i < strlen($entry); $i++) { |
|
59 | 59 | if (in_array(strtolower($entry[$i]), static::$availableLetters)) { |
60 | 60 | $clearArray[$entry[$i]] = true; |
61 | 61 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | |
96 | 96 | $entry = reset($entries); |
97 | 97 | $this->assertEquals('files', key($entries)); |
98 | - $this->assertEquals([ // simple upload |
|
98 | + $this->assertEquals([// simple upload |
|
99 | 99 | 'name' => 'facepalm.jpg', |
100 | 100 | 'type' => 'image<?= \'/\'; ?>jpeg', |
101 | 101 | 'tmp_name' => '/tmp/php3zU3t5', |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | protected function fileDataset(): array |
29 | 29 | { |
30 | 30 | return [ |
31 | - 'files' => [ // simple upload |
|
31 | + 'files' => [// simple upload |
|
32 | 32 | 'name' => 'facepalm.jpg', |
33 | 33 | 'type' => 'image/jpeg', |
34 | 34 | 'tmp_name' => '/tmp/php3zU3t5', |
35 | 35 | 'error' => UPLOAD_ERR_OK, |
36 | 36 | 'size' => 591387, |
37 | 37 | ], |
38 | - 'download' => [ // multiple upload |
|
38 | + 'download' => [// multiple upload |
|
39 | 39 | 'name' => [ |
40 | 40 | 'file1' => 'MyFile.txt', |
41 | 41 | 'file2' => 'MyFile.jpg', |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | protected function strangeFileDataset(): array |
64 | 64 | { |
65 | 65 | return [ |
66 | - 'fi' . chr(0) . 'les' => [ // simple upload |
|
66 | + 'fi' . chr(0) . 'les' => [// simple upload |
|
67 | 67 | 'name' => 'face' . chr(0) . 'palm.jpg', |
68 | 68 | 'type' => 'image<?= \'/\'; ?>jpeg', |
69 | 69 | 'tmp_name' => '/tmp/php3zU3t5', |
70 | 70 | 'error' => UPLOAD_ERR_OK, |
71 | 71 | 'size' => '591387', |
72 | 72 | ], |
73 | - 'download' => [ // multiple upload |
|
73 | + 'download' => [// multiple upload |
|
74 | 74 | 'name' => [ |
75 | 75 | 'file1' => 'C:\System\MyFile.txt', |
76 | 76 | 'file2' => 'A:\MyFile.jpg', |
@@ -70,8 +70,8 @@ |
||
70 | 70 | return null; |
71 | 71 | } |
72 | 72 | $isFull = DIRECTORY_SEPARATOR == $path[0]; |
73 | - $known = realpath($isFull ? $path : static::$basicPath . DIRECTORY_SEPARATOR . $path ); |
|
74 | - return (false === $known) ? null : $known ; |
|
73 | + $known = realpath($isFull ? $path : static::$basicPath . DIRECTORY_SEPARATOR . $path); |
|
74 | + return (false === $known) ? null : $known; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | protected function getType(string $path): string |