@@ -112,16 +112,16 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | - * {@inheritdoc} |
|
| 116 | - */ |
|
| 115 | + * {@inheritdoc} |
|
| 116 | + */ |
|
| 117 | 117 | public function getExtension(): string |
| 118 | 118 | { |
| 119 | 119 | return $this->extension; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | - * {@inheritdoc} |
|
| 124 | - */ |
|
| 123 | + * {@inheritdoc} |
|
| 124 | + */ |
|
| 125 | 125 | public function setExtension(string $name): self |
| 126 | 126 | { |
| 127 | 127 | $this->extension = strtolower($name); |
@@ -130,8 +130,8 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | - * {@inheritdoc} |
|
| 134 | - */ |
|
| 133 | + * {@inheritdoc} |
|
| 134 | + */ |
|
| 135 | 135 | public function getFullName(): string |
| 136 | 136 | { |
| 137 | 137 | return $this->extension === '' ? |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * {@inheritdoc} |
|
| 144 | - */ |
|
| 143 | + * {@inheritdoc} |
|
| 144 | + */ |
|
| 145 | 145 | public function getMD5(): string |
| 146 | 146 | { |
| 147 | 147 | $hash = md5_file($this->getPathname()); |
@@ -149,24 +149,24 @@ discard block |
||
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
| 152 | - * {@inheritdoc} |
|
| 153 | - */ |
|
| 152 | + * {@inheritdoc} |
|
| 153 | + */ |
|
| 154 | 154 | public function getPathname(): string |
| 155 | 155 | { |
| 156 | 156 | return parent::getPathname(); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
| 160 | - * {@inheritdoc} |
|
| 161 | - */ |
|
| 160 | + * {@inheritdoc} |
|
| 161 | + */ |
|
| 162 | 162 | public function getSize(): int |
| 163 | 163 | { |
| 164 | 164 | return parent::getSize(); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | - * {@inheritdoc} |
|
| 169 | - */ |
|
| 168 | + * {@inheritdoc} |
|
| 169 | + */ |
|
| 170 | 170 | public function getMimeType(): string |
| 171 | 171 | { |
| 172 | 172 | if (empty($this->mimeType)) { |
@@ -185,16 +185,16 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * {@inheritdoc} |
|
| 189 | - */ |
|
| 188 | + * {@inheritdoc} |
|
| 189 | + */ |
|
| 190 | 190 | public function getName(): string |
| 191 | 191 | { |
| 192 | 192 | return $this->name; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | - * {@inheritdoc} |
|
| 197 | - */ |
|
| 196 | + * {@inheritdoc} |
|
| 197 | + */ |
|
| 198 | 198 | public function setName(string $name): self |
| 199 | 199 | { |
| 200 | 200 | $cleanName = preg_replace('/[^A-Za-z0-9\.]+/', '_', $name); |
@@ -207,8 +207,8 @@ discard block |
||
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
| 210 | - * {@inheritdoc} |
|
| 211 | - */ |
|
| 210 | + * {@inheritdoc} |
|
| 211 | + */ |
|
| 212 | 212 | public function getError(): int |
| 213 | 213 | { |
| 214 | 214 | return $this->error; |
@@ -146,8 +146,8 @@ |
||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
| 149 | - * Whether the file is uploaded |
|
| 150 | - */ |
|
| 149 | + * Whether the file is uploaded |
|
| 150 | + */ |
|
| 151 | 151 | public function isUploaded(): bool |
| 152 | 152 | { |
| 153 | 153 | return count($this->files) > 0; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * The uploaded file information |
| 103 | 103 | * @var UploadFileInfo|array<int, UploadFileInfo>|bool |
| 104 | 104 | */ |
| 105 | - protected UploadFileInfo|array|bool $uploadInfo = false; |
|
| 105 | + protected UploadFileInfo | array | bool $uploadInfo = false; |
|
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * Create new instance |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | * Return the uploaded file information |
| 245 | 245 | * @return UploadFileInfo|array<int, UploadFileInfo>|bool |
| 246 | 246 | */ |
| 247 | - public function getInfo(): UploadFileInfo|array|bool |
|
| 247 | + public function getInfo(): UploadFileInfo | array | bool |
|
| 248 | 248 | { |
| 249 | 249 | return $this->uploadInfo; |
| 250 | 250 | } |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | $value = floatval($matches['size']); |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - return (int)($value * pow(1024, $units[$unit])); |
|
| 144 | + return (int) ($value * pow(1024, $units[$unit])); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | * @param array<int, string>|string $extensions |
| 79 | 79 | * @param bool $exclude |
| 80 | 80 | */ |
| 81 | - public function __construct(array|string $extensions, bool $exclude = false) |
|
| 81 | + public function __construct(array | string $extensions, bool $exclude = false) |
|
| 82 | 82 | { |
| 83 | 83 | if (!is_array($extensions)) { |
| 84 | 84 | $extensions = [$extensions]; |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | * Create new instance |
| 72 | 72 | * @param array<int, string>|string $mimeType |
| 73 | 73 | */ |
| 74 | - public function __construct(array|string $mimeType) |
|
| 74 | + public function __construct(array | string $mimeType) |
|
| 75 | 75 | { |
| 76 | 76 | if (!is_array($mimeType)) { |
| 77 | 77 | $mimeType = [$mimeType]; |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | * Create new instance |
| 73 | 73 | * @param int|string $size |
| 74 | 74 | */ |
| 75 | - public function __construct(int|string $size) |
|
| 75 | + public function __construct(int | string $size) |
|
| 76 | 76 | { |
| 77 | 77 | if (is_int($size) === false) { |
| 78 | 78 | $size = Helper::sizeInBytes($size); |