Use imports instead of FQNs

This commit is contained in:
Jan Böhmer 2023-06-11 14:55:06 +02:00
parent f63b6d7207
commit 5629215ce4
179 changed files with 792 additions and 597 deletions

View file

@ -41,15 +41,16 @@ declare(strict_types=1);
namespace App\Security\Voter;
use Symfony\Bundle\SecurityBundle\Security;
use App\Entity\Parts\Part;
use App\Entity\PriceInformations\Orderdetail;
use App\Entity\UserSystem\User;
use App\Services\UserSystem\PermissionManager;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Security;
class OrderdetailVoter extends ExtendedVoter
{
public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, protected \Symfony\Bundle\SecurityBundle\Security $security)
public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, protected Security $security)
{
parent::__construct($resolver, $entityManager);
}
@ -71,7 +72,7 @@ class OrderdetailVoter extends ExtendedVoter
};
//If we have no part associated use the generic part permission
if (is_string($subject) || !$subject->getPart() instanceof \App\Entity\Parts\Part) {
if (is_string($subject) || !$subject->getPart() instanceof Part) {
return $this->resolver->inherit($user, 'parts', $operation) ?? false;
}