Skip to content

Commit

Permalink
fix(Classifier): fix wrong str_contains usage
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jun 25, 2024
1 parent 649707e commit be32a23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Hooks/FileListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function handle(Event $event): void {
if ($node instanceof Folder) {
return;
}
if (!str_contains('external', $node->getMountPoint()->getMountType())) {
if (!str_contains($node->getMountPoint()->getMountType(), 'external')) {
return;
}
if (in_array($node->getName(), [...Constants::IGNORE_MARKERS_ALL, ...Constants::IGNORE_MARKERS_IMAGE, ...Constants::IGNORE_MARKERS_AUDIO, ...Constants::IGNORE_MARKERS_VIDEO], true)) {
Expand Down Expand Up @@ -295,6 +295,7 @@ public function postDelete(Node $node, bool $recurse = true): void {
* @throws \OCP\Files\InvalidPathException
*/
public function postInsert(Node $node, bool $recurse = true): void {
throw new \Exception('postInsert');
if ($node->getType() === FileInfo::TYPE_FOLDER) {

Check failure on line 299 in lib/Hooks/FileListener.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-stable29)

UnevaluatedCode

lib/Hooks/FileListener.php:299:3: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)

Check failure on line 299 in lib/Hooks/FileListener.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-stable29)

UnevaluatedCode

lib/Hooks/FileListener.php:299:3: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)

Check failure on line 299 in lib/Hooks/FileListener.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.3, dev-master)

UnevaluatedCode

lib/Hooks/FileListener.php:299:3: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)

Check failure on line 299 in lib/Hooks/FileListener.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.1, dev-master)

UnevaluatedCode

lib/Hooks/FileListener.php:299:3: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)

Check failure on line 299 in lib/Hooks/FileListener.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-stable29)

UnevaluatedCode

lib/Hooks/FileListener.php:299:3: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)

Check failure on line 299 in lib/Hooks/FileListener.php

View workflow job for this annotation

GitHub Actions / Nextcloud (8.2, dev-master)

UnevaluatedCode

lib/Hooks/FileListener.php:299:3: UnevaluatedCode: Expressions after return/throw/continue (see https://psalm.dev/084)
if (!$recurse) {
return;
Expand Down

0 comments on commit be32a23

Please sign in to comment.