@@ -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 | } |
@@ -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 | ]; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $value = $modifiers['size']; |
31 | 31 | |
32 | - if (in_array($value, [ 'l', 'm', 's' ])) |
|
32 | + if (in_array($value, ['l', 'm', 's'])) |
|
33 | 33 | { |
34 | 34 | $filters['size'] = $value; |
35 | 35 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | 'class' => "icon-download-alt", |
56 | 56 | 'href' => $path, |
57 | - 'title' => $this->t('download', [], [ 'scope' => 'fileupload.element' ]) |
|
57 | + 'title' => $this->t('download', [], ['scope' => 'fileupload.element']) |
|
58 | 58 | |
59 | 59 | ]); |
60 | 60 | } |
@@ -173,7 +173,7 @@ |
||
173 | 173 | */ |
174 | 174 | static protected function from_parts(array $parts) |
175 | 175 | { |
176 | - list($root, $hash, $random) = $parts + [ 2 => null]; |
|
176 | + list($root, $hash, $random) = $parts + [2 => null]; |
|
177 | 177 | |
178 | 178 | $random = $random ?: self::random(); |
179 | 179 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $encoded_uuid = substr($key, self::ENCODED_ID_LENGTH + 1, self::ENCODED_UUID_LENGTH); |
78 | 78 | $hash = substr($key, self::ENCODED_ID_LENGTH + 1 + self::ENCODED_UUID_LENGTH + 1); |
79 | 79 | |
80 | - return [ $encoded_id, $encoded_uuid, $hash ]; |
|
80 | + return [$encoded_id, $encoded_uuid, $hash]; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | throw new \LogicException("Invalid UUID: $uuid."); |
133 | 133 | } |
134 | 134 | |
135 | - return Base64::encode_unpadded(hex2bin(strtr($uuid, [ '-' => '' ]))); |
|
135 | + return Base64::encode_unpadded(hex2bin(strtr($uuid, ['-' => '']))); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |