@@ -11,13 +11,10 @@ |
||
11 | 11 | |
12 | 12 | namespace Icybee\Modules\Files\Block; |
13 | 13 | |
14 | -use ICanBoogie\I18n; |
|
15 | 14 | use ICanBoogie\Operation; |
16 | - |
|
17 | 15 | use Brickrouge\Element; |
18 | 16 | use Brickrouge\Document; |
19 | 17 | use Brickrouge\Form; |
20 | - |
|
21 | 18 | use Icybee\Modules\Files as Root; |
22 | 19 | use Icybee\Modules\Files\File; |
23 | 20 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | Element::CHILDREN => [ |
62 | 62 | |
63 | - $this->t('The folder %folder is not writable !', [ '%folder' => $folder ]) |
|
63 | + $this->t('The folder %folder is not writable !', ['%folder' => $folder]) |
|
64 | 64 | |
65 | 65 | ] |
66 | 66 | ]; |
@@ -12,7 +12,6 @@ |
||
12 | 12 | namespace Icybee\Modules\Files; |
13 | 13 | |
14 | 14 | use ICanBoogie\Core; |
15 | - |
|
16 | 15 | use Icybee\Modules\Files\Storage\FileStorage; |
17 | 16 | use Icybee\Modules\Files\Storage\FileStorageIndex; |
18 | 17 |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use ICanBoogie\Errors; |
15 | 15 | use ICanBoogie\HTTP\Request; |
16 | 16 | use ICanBoogie\HTTP\File as HTTPFile; |
17 | - |
|
18 | 17 | use Icybee\Modules\Files\File; |
19 | 18 | use Icybee\Modules\Files\Module; |
20 | 19 |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | if (!$file) |
123 | 123 | { |
124 | - $this->response->errors->add(File::HTTP_FILE, "Invalid or deleted file: %pathname", [ 'pathname' => $path ]); |
|
124 | + $this->response->errors->add(File::HTTP_FILE, "Invalid or deleted file: %pathname", ['pathname' => $path]); |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | |
159 | 159 | if ($max_file_size && $max_file_size < $file->size) |
160 | 160 | { |
161 | - $error_message = $errors->format("Maximum file size is :size Mb", [ ':size' => round($max_file_size / 1024) ]); |
|
161 | + $error_message = $errors->format("Maximum file size is :size Mb", [':size' => round($max_file_size / 1024)]); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | if ($this->accept && !$file->match($this->accept)) |
165 | 165 | { |
166 | - $error_message = $errors->format("Only the following file types are accepted: %accepted.", [ '%accepted' => implode(', ', $this->accept) ]); |
|
166 | + $error_message = $errors->format("Only the following file types are accepted: %accepted.", ['%accepted' => implode(', ', $this->accept)]); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | if ($error_message) |
@@ -12,8 +12,6 @@ |
||
12 | 12 | namespace Icybee\Modules\Files\Routing; |
13 | 13 | |
14 | 14 | use ICanBoogie\HTTP\FileResponse; |
15 | -use ICanBoogie\HTTP\Request; |
|
16 | - |
|
17 | 15 | use Icybee\Modules\Files\Binding\CoreBindings; |
18 | 16 | use Icybee\Modules\Files\File; |
19 | 17 | use Icybee\Modules\Files\FileModel; |
@@ -12,12 +12,10 @@ |
||
12 | 12 | namespace Icybee\Modules\Files\Routing; |
13 | 13 | |
14 | 14 | use ICanBoogie\HTTP\FileResponse; |
15 | -use ICanBoogie\HTTP\Request; |
|
16 | 15 | use ICanBoogie\Routing\Controller; |
17 | 16 | use ICanBoogie\Binding\Routing\ControllerBindings; |
18 | 17 | use ICanBoogie\Binding\Routing\ForwardUndefinedPropertiesToApplication; |
19 | 18 | use ICanBoogie\Module\ControllerBindings as ModuleBindings; |
20 | - |
|
21 | 19 | use Icybee\Modules\Files\Binding\CoreBindings; |
22 | 20 | use Icybee\Modules\Files\File; |
23 | 21 |
@@ -27,9 +27,9 @@ |
||
27 | 27 | Model::EXTENDING => 'nodes', |
28 | 28 | Model::SCHEMA => [ |
29 | 29 | |
30 | - 'size' => [ 'integer', 'unsigned' => true ], |
|
31 | - 'mime' => [ 'varchar', 'charset' => 'ascii/general_ci' ], |
|
32 | - 'extension' => [ 'varchar', 16, 'charset' => 'ascii/general_ci' ], |
|
30 | + 'size' => ['integer', 'unsigned' => true], |
|
31 | + 'mime' => ['varchar', 'charset' => 'ascii/general_ci'], |
|
32 | + 'extension' => ['varchar', 16, 'charset' => 'ascii/general_ci'], |
|
33 | 33 | 'description' => 'text' |
34 | 34 | |
35 | 35 | ] |
@@ -94,7 +94,7 @@ |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | $hash = $storage->add($path)->hash; |
97 | - $index->add(IndexKey::from([ $nid, $uuid, $hash ])); |
|
97 | + $index->add(IndexKey::from([$nid, $uuid, $hash])); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | $model->remove_column('path'); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | class DownloadColumn extends ManageBlock\Column |
13 | 13 | { |
14 | - public function __construct(ManageBlock $manager, $id, array $options=[]) |
|
14 | + public function __construct(ManageBlock $manager, $id, array $options = []) |
|
15 | 15 | { |
16 | 16 | parent::__construct($manager, $id, [ |
17 | 17 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | parent::__construct($module, $attributes + [ |
35 | 35 | |
36 | - self::T_COLUMNS_ORDER => [ 'title', 'size', 'download', 'is_online', 'uid', 'mime', 'updated_at' ] |
|
36 | + self::T_COLUMNS_ORDER => ['title', 'size', 'download', 'is_online', 'uid', 'mime', 'updated_at'] |
|
37 | 37 | |
38 | 38 | ]); |
39 | 39 | } |