Fixed PHPstan warnings.

This commit is contained in:
Jan Böhmer 2022-03-04 13:22:40 +01:00
parent 4a90f2ac35
commit 15a31433e1
9 changed files with 9 additions and 12 deletions

View file

@ -178,10 +178,6 @@ abstract class Attachment extends AbstractNamedDBElement
//After the %PLACEHOLDER% comes a slash, so we can check if we have a placeholder via explode
$tmp = explode('/', $this->path);
if (empty($tmp)) {
return true;
}
return !in_array($tmp[0], array_merge(static::INTERNAL_PLACEHOLDER, static::BUILTIN_PLACEHOLDER), false);
}
@ -196,10 +192,6 @@ abstract class Attachment extends AbstractNamedDBElement
//After the %PLACEHOLDER% comes a slash, so we can check if we have a placeholder via explode
$tmp = explode('/', $this->path);
if (empty($tmp)) {
return false;
}
return '%SECURE%' === $tmp[0];
}
@ -437,9 +429,6 @@ abstract class Attachment extends AbstractNamedDBElement
//After the %PLACEHOLDER% comes a slash, so we can check if we have a placeholder via explode
$tmp = explode('/', $path);
//Builtins must have a %PLACEHOLDER% construction
if (empty($tmp)) {
return false;
}
return in_array($tmp[0], static::BUILTIN_PLACEHOLDER, false);
}