mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 06:39:40 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -46,11 +46,10 @@ class ElementCacheTagGenerator
|
|||
{
|
||||
//Ensure that the given element is a class name
|
||||
if (is_object($element)) {
|
||||
$element = get_class($element);
|
||||
} else { //And that the class exists
|
||||
if (!class_exists($element)) {
|
||||
throw new \InvalidArgumentException("The given class '$element' does not exist!");
|
||||
}
|
||||
$element = $element::class;
|
||||
} elseif (!class_exists($element)) {
|
||||
//And that the class exists
|
||||
throw new \InvalidArgumentException("The given class '$element' does not exist!");
|
||||
}
|
||||
|
||||
//Check if the tag is already cached
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue