mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-05 07:54:35 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -360,11 +360,7 @@ class EntityURLGenerator
|
|||
*/
|
||||
protected function mapToController(array $map, string|AbstractDBElement $entity): string
|
||||
{
|
||||
if (is_string($entity)) { //If a class name was already passed, then use it directly
|
||||
$class = $entity;
|
||||
} else { //Otherwise get the class name from the entity
|
||||
$class = $entity::class;
|
||||
}
|
||||
$class = is_string($entity) ? $entity : $entity::class;
|
||||
|
||||
//Check if we have an direct mapping for the given class
|
||||
if (!array_key_exists($class, $map)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue