diff --git a/lib/Model/FileShares.php b/lib/Model/FileShares.php index 0269b714..15522d68 100644 --- a/lib/Model/FileShares.php +++ b/lib/Model/FileShares.php @@ -59,7 +59,7 @@ class FileShares implements JsonSerializable { * * @param FileShares $currentShares */ - public function __construct(FileShares $currentShares = null) { + public function __construct(?FileShares $currentShares = null) { if ($currentShares === null) { return; } diff --git a/lib/Service/ExternalFilesService.php b/lib/Service/ExternalFilesService.php index 0af4a36d..0114a082 100644 --- a/lib/Service/ExternalFilesService.php +++ b/lib/Service/ExternalFilesService.php @@ -201,7 +201,7 @@ public function updateDocumentAccess(FilesDocument &$document, Node $file) { } else { $access->addUsers($mount->getUsers()); $access->addGroups($mount->getGroups()); -// $access->addCircles($mount->getCircles()); + // $access->addCircles($mount->getCircles()); } // twist 'n tweak. diff --git a/lib/Service/FilesService.php b/lib/Service/FilesService.php index 47cda383..e057dbf0 100644 --- a/lib/Service/FilesService.php +++ b/lib/Service/FilesService.php @@ -753,12 +753,12 @@ private function updateFilesDocumentFromFile(FilesDocument $document, Node $file */ private function updateDocumentAccess(FilesDocument $document, Node $file) { -// $index = $document->getIndex(); + // $index = $document->getIndex(); // This should not be needed, let's assume we _need_ to update document access -// if (!$index->isStatus(IIndex::INDEX_FULL) -// && !$index->isStatus(IIndex::INDEX_META)) { -// return; -// } + // if (!$index->isStatus(IIndex::INDEX_FULL) + // && !$index->isStatus(IIndex::INDEX_META)) { + // return; + // } $this->localFilesService->updateDocumentAccess($document, $file); $this->externalFilesService->updateDocumentAccess($document, $file); diff --git a/lib/Service/MiscService.php b/lib/Service/MiscService.php index 08e11b14..4d2f638e 100644 --- a/lib/Service/MiscService.php +++ b/lib/Service/MiscService.php @@ -60,10 +60,10 @@ public function __construct(ILogger $logger) { * @param int $level */ public function log(string $message, int $level = 2) { - $data = array( + $data = [ 'app' => Application::APP_ID, 'level' => $level - ); + ]; $this->logger->log($level, $message, $data); } diff --git a/lib/Service/SettingsService.php b/lib/Service/SettingsService.php index 9af423e8..07b11d87 100644 --- a/lib/Service/SettingsService.php +++ b/lib/Service/SettingsService.php @@ -71,7 +71,7 @@ public function __construct(IConfig $config, string $userId, MiscService $miscSe * @return bool */ public function checkConfig(array $data): bool { -// return false; + // return false; return true; } diff --git a/lib/Tools/Traits/TArrayTools.php b/lib/Tools/Traits/TArrayTools.php index 450a3091..9df3b619 100644 --- a/lib/Tools/Traits/TArrayTools.php +++ b/lib/Tools/Traits/TArrayTools.php @@ -244,7 +244,7 @@ protected function getList(string $k, array $arr, array $import, array $default $list = $this->getArray($k, $arr, $default); $r = []; - list($obj, $method) = $import; + [$obj, $method] = $import; foreach ($list as $item) { try { $o = new $obj();