diff options
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/AppInfo/Application.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Command/Scan.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Helper.php | 8 | ||||
-rw-r--r-- | apps/files/lib/Service/TagService.php | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php index 8bda6329d29..b043cfeb6ac 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -50,7 +50,7 @@ class Application extends App { public const APP_ID = 'files'; - public function __construct(array $urlParams=array()) { + public function __construct(array $urlParams=[]) { parent::__construct(self::APP_ID, $urlParams); $container = $this->getContainer(); $server = $container->getServer(); diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 39eebbb2c43..38d4b1cc979 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -174,7 +174,7 @@ class Scan extends Base { if ($inputPath) { $inputPath = '/' . trim($inputPath, '/'); list (, $user,) = explode('/', $inputPath, 3); - $users = array($user); + $users = [$user]; } else if ($input->getOption('all')) { $users = $this->userManager->search(''); } else { diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 70b878f43ad..7c5d2a08b88 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -200,7 +200,7 @@ class ViewController extends Controller { $collapseClasses = 'collapsible'; } - $favoritesSublistArray = Array(); + $favoritesSublistArray = []; $navBarPositionPosition = 6; $currentCount = 0; diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index f88689af266..c46d3028553 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -51,7 +51,7 @@ class Helper { $l = \OC::$server->getL10N('files'); $maxUploadFileSize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']); $maxHumanFileSize = \OCP\Util::humanFileSize($maxUploadFileSize); - $maxHumanFileSize = $l->t('Upload (max. %s)', array($maxHumanFileSize)); + $maxHumanFileSize = $l->t('Upload (max. %s)', [$maxHumanFileSize]); return [ 'uploadMaxFilesize' => $maxUploadFileSize, @@ -140,7 +140,7 @@ class Helper { * @return array formatted file info */ public static function formatFileInfo(FileInfo $i) { - $entry = array(); + $entry = []; $entry['id'] = $i['fileid']; $entry['parentId'] = $i['parent']; @@ -182,7 +182,7 @@ class Helper { * @return array */ public static function formatFileInfos($fileInfos) { - $files = array(); + $files = []; foreach ($fileInfos as $i) { $files[] = self::formatFileInfo($i); } @@ -262,7 +262,7 @@ class Helper { } else if ($sortAttribute === 'size') { $sortFunc = 'compareSize'; } - usort($files, array(Helper::class, $sortFunc)); + usort($files, [Helper::class, $sortFunc]); if ($sortDescending) { $files = array_reverse($files); } diff --git a/apps/files/lib/Service/TagService.php b/apps/files/lib/Service/TagService.php index a477db324ac..5df00ae5c5f 100644 --- a/apps/files/lib/Service/TagService.php +++ b/apps/files/lib/Service/TagService.php @@ -83,7 +83,7 @@ class TagService { public function updateFileTags($path, $tags) { $fileId = $this->homeFolder->get($path)->getId(); - $currentTags = $this->tagger->getTagsForObjects(array($fileId)); + $currentTags = $this->tagger->getTagsForObjects([$fileId]); if (!empty($currentTags)) { $currentTags = current($currentTags); |