@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\stub; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\saver; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\saver; |
5 | 5 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | protected static function getTempFile(string $content) |
70 | 70 | { |
71 | - $stream = fopen('php://memory','rb+'); |
|
71 | + $stream = fopen('php://memory', 'rb+'); |
|
72 | 72 | fwrite($stream, $content); // write file into stream |
73 | 73 | rewind($stream); // reset stream pointer to start |
74 | 74 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\saver; |
5 | 5 | |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | public function rules(): array |
93 | 93 | { |
94 | 94 | return [ |
95 | - ['model', function ($attribute) { |
|
95 | + ['model', function($attribute) { |
|
96 | 96 | if ($this->$attribute->isNewRecord || $this->$attribute->id === null) { |
97 | 97 | $this->$attribute->addError($attribute, 'Parent model must be saved.'); |
98 | 98 | } |
99 | 99 | }], |
100 | 100 | [ |
101 | 101 | 'fileArray', |
102 | - function ($attribute) { |
|
102 | + function($attribute) { |
|
103 | 103 | // max count |
104 | - $fileArray = array_filter($this->fileArray, function (File $file) { |
|
104 | + $fileArray = array_filter($this->fileArray, function(File $file) { |
|
105 | 105 | return $file->isActual(); |
106 | 106 | }); |
107 | 107 | if (\count($fileArray) > $this->aliasConfig['maxCount']) { |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\model; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\formatter\icon; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\formatter; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\formatter\preview; |
5 | 5 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @var array |
20 | 20 | */ |
21 | 21 | public static $iconPreviewArray = [ |
22 | - 'file' => ['txt', 'doc',], |
|
22 | + 'file' => ['txt', 'doc', ], |
|
23 | 23 | ]; |
24 | 24 | |
25 | 25 | /** |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace tkanstantsin\fileupload\formatter\adapter; |
5 | 5 |