mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-29 13:10:06 +02:00
Fixed PHPstan warnings.
This commit is contained in:
parent
4a90f2ac35
commit
15a31433e1
9 changed files with 9 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue