@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $factor = floor((strlen($bytes) - 1) / 3); |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | - $unit = [ 'B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' ]; |
|
| 492 | + $unit = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; |
|
| 493 | 493 | |
| 494 | 494 | $factor = floor((strlen($bytes) - 1) / 3); |
| 495 | 495 | |
@@ -623,12 +623,12 @@ discard block |
||
| 623 | 623 | } |
| 624 | 624 | |
| 625 | 625 | $array = $this->parseValAsMultiple($value); |
| 626 | - array_walk_recursive($array, function ($item) use (&$files) { |
|
| 626 | + array_walk_recursive($array, function($item) use (&$files) { |
|
| 627 | 627 | $array = $this->parseValAsMultiple($item); |
| 628 | 628 | $files = array_merge($files, $array); |
| 629 | 629 | }); |
| 630 | 630 | |
| 631 | - $files = array_filter($files, function ($file) { |
|
| 631 | + $files = array_filter($files, function($file) { |
|
| 632 | 632 | return is_string($file) && isset($file[0]); |
| 633 | 633 | }); |
| 634 | 634 | $files = array_unique($files); |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | { |
| 727 | 727 | // Bag value if singular |
| 728 | 728 | if (!is_array($values) || isset($values['id'])) { |
| 729 | - $values = [ $values ]; |
|
| 729 | + $values = [$values]; |
|
| 730 | 730 | } |
| 731 | 731 | |
| 732 | 732 | $parsed = []; |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | { |
| 767 | 767 | // Bag value if singular |
| 768 | 768 | if (isset($files['error'])) { |
| 769 | - $files = [ $files ]; |
|
| 769 | + $files = [$files]; |
|
| 770 | 770 | } |
| 771 | 771 | |
| 772 | 772 | $parsed = []; |
@@ -808,7 +808,7 @@ discard block |
||
| 808 | 808 | |
| 809 | 809 | if ($this['multiple']) { |
| 810 | 810 | if (!is_array($values)) { |
| 811 | - $values = empty($values) && !is_numeric($values) ? [] : [ $values ]; |
|
| 811 | + $values = empty($values) && !is_numeric($values) ? [] : [$values]; |
|
| 812 | 812 | } |
| 813 | 813 | } else { |
| 814 | 814 | if (is_array($values)) { |
@@ -1065,7 +1065,7 @@ discard block |
||
| 1065 | 1065 | public function sanitizeFilename($filename) |
| 1066 | 1066 | { |
| 1067 | 1067 | // Remove blacklisted caharacters |
| 1068 | - $blacklist = [ '/', '\\', '\0', '*', ':', '?', '"', '<', '>', '|', '#', '&', '!', '`', ' ' ]; |
|
| 1068 | + $blacklist = ['/', '\\', '\0', '*', ':', '?', '"', '<', '>', '|', '#', '&', '!', '`', ' ']; |
|
| 1069 | 1069 | $filename = str_replace($blacklist, '_', (string)$filename); |
| 1070 | 1070 | |
| 1071 | 1071 | // Avoid hidden file or trailing dot |
@@ -1363,7 +1363,7 @@ discard block |
||
| 1363 | 1363 | if (!file_exists($uploadPath)) { |
| 1364 | 1364 | $this->logger->debug(sprintf( |
| 1365 | 1365 | '[%s] Upload directory [%s] does not exist; attempting to create path', |
| 1366 | - [ get_called_class().'::'.__FUNCTION__ ], |
|
| 1366 | + [get_called_class().'::'.__FUNCTION__], |
|
| 1367 | 1367 | $uploadPath |
| 1368 | 1368 | )); |
| 1369 | 1369 | |
@@ -1581,7 +1581,7 @@ discard block |
||
| 1581 | 1581 | { |
| 1582 | 1582 | $propIdent = $this->ident(); |
| 1583 | 1583 | |
| 1584 | - $filterErrNoFile = function (array $file) { |
|
| 1584 | + $filterErrNoFile = function(array $file) { |
|
| 1585 | 1585 | return $file['error'] !== UPLOAD_ERR_NO_FILE; |
| 1586 | 1586 | }; |
| 1587 | 1587 | $uploadedFiles = static::parseUploadedFiles($_FILES, $filterErrNoFile, $propIdent); |