Skip to content

Commit

Permalink
cleaning code
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Nov 14, 2024
1 parent 9bfc647 commit a4947c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
1 change: 0 additions & 1 deletion lib/Listeners/ListenersCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function __construct(
) {
}


/**
* @return bool
*/
Expand Down
12 changes: 3 additions & 9 deletions lib/Provider/FilesProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*/
class FilesProvider implements IFullTextSearchProvider {
public const FILES_PROVIDER_ID = 'files';
private IRunner $runner;
private ?IRunner $runner = null;
private IIndexOptions $indexOptions;

public function __construct(
Expand All @@ -54,23 +54,20 @@ public function __construct(
) {
}


/**
* return unique id of the provider
*/
public function getId(): string {
return self::FILES_PROVIDER_ID;
}


/**
* return name of the provider
*/
public function getName(): string {
return 'Files';
}


/**
* @return array
*/
Expand All @@ -83,7 +80,6 @@ public function getConfiguration(): array {
return $config;
}


/**
* @param IRunner $runner
*/
Expand All @@ -92,15 +88,13 @@ public function setRunner(IRunner $runner) {
$this->filesService->setRunner($runner);
}


/**
* @param IIndexOptions $options
*/
public function setIndexOptions(IIndexOptions $options) {
$this->indexOptions = $options;
}


/**
* @return ISearchTemplate
*/
Expand Down Expand Up @@ -291,8 +285,8 @@ public function unloadProvider() {
*
* @param ISearchRequest $request
*/
public function improveSearchRequest(ISearchRequest $request) {
$this->searchService->improveSearchRequest($request);
public function improveSearchRequest(ISearchRequest $searchRequest) {
$this->searchService->improveSearchRequest($searchRequest);
}


Expand Down
7 changes: 1 addition & 6 deletions lib/Service/ExternalFilesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function __construct(
) {
}


/**
* @param string $userId
*/
Expand Down Expand Up @@ -135,8 +134,6 @@ public function updateDocumentAccess(FilesDocument &$document, Node $file) {
$document->getIndex()
->addOptionInt('external_mount_id', $mount->getId());
$document->setAccess($access);

$document->setAccess($access);
}


Expand Down Expand Up @@ -263,8 +260,6 @@ private function getRandomUserFromMountPoint(MountPoint $mount): string {
}
}

throw new ExternalMountWithNoViewerException(
'cannot get a valid user for external mount'
);
throw new ExternalMountWithNoViewerException('cannot get a valid user for external mount');
}
}
4 changes: 3 additions & 1 deletion lib/Service/FilesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ private function updateShareNames(FilesDocument $document, Node $file): array {
$shareNames[$this->secureUsername($username)] =
(!is_string($path)) ? $path = '' : $path;
} catch (Throwable $e) {
$this->logger->warning('Issue while getting information on documentId:' . $document->getId(), ['exception' => $e]);
$this->logger->debug('Issue while getting information on documentId:' . $document->getId(), ['exception' => $e]);
}
}

Expand Down Expand Up @@ -1143,6 +1143,8 @@ private function manageContentErrorException(IIndexDocument $document, Throwable
$t->getMessage(),
IIndex::ERROR_SEV_3
);

$this->logger->debug('content error', ['exception' => $t]);
}


Expand Down

0 comments on commit a4947c8

Please sign in to comment.