Applied rector suggestions

This commit is contained in:
Jan Böhmer 2024-06-22 00:31:43 +02:00
parent 4106bcef5f
commit 20f32c7f12
170 changed files with 808 additions and 761 deletions

View file

@ -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)) {