Fixed some issues detected by PHPstan.

This commit is contained in:
Jan Böhmer 2020-02-01 17:00:03 +01:00
parent f2ff77a8b3
commit dd1f806c4e
30 changed files with 310 additions and 45 deletions

View file

@ -36,6 +36,7 @@ use App\Entity\Parts\MeasurementUnit;
use App\Entity\Parts\Part;
use App\Entity\Parts\PartLot;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\Supplier;
use App\Entity\PriceInformations\Currency;
use App\Entity\PriceInformations\Orderdetail;
use App\Entity\PriceInformations\Pricedetail;
@ -43,7 +44,6 @@ use App\Entity\UserSystem\Group;
use App\Entity\UserSystem\User;
use App\Exceptions\EntityNotSupportedException;
use function get_class;
use Proxies\__CG__\App\Entity\Parts\Supplier;
use Symfony\Contracts\Translation\TranslatorInterface;
class ElementTypeNameGenerator

View file

@ -133,7 +133,7 @@ class EntityURLGenerator
/**
* Generates an URL to a page, where info about this entity can be viewed.
*
* @param mixed $entity The entity for which the info should be generated
* @param DBElement $entity The entity for which the info should be generated
*
* @return string The URL to the info page
*
@ -223,7 +223,7 @@ class EntityURLGenerator
* Generates an URL to a page, where a new entity can be created, that has the same informations as the
* given entity (element cloning).
*
* @param mixed $entity The entity for which the link should be generated
* @param DBElement $entity The entity for which the link should be generated
*
* @return string the URL to the page
*
@ -241,7 +241,7 @@ class EntityURLGenerator
/**
* Generates an URL to a page, where all parts are listed, which are contained in the given element.
*
* @param mixed $entity The entity for which the link should be generated
* @param DBElement $entity The entity for which the link should be generated
*
* @return string the URL to the page
*

View file

@ -44,7 +44,7 @@ class PermissionResolver
/**
* PermissionResolver constructor.
*/
public function __construct(ParameterBagInterface $params, ContainerInterface $container)
public function __construct(ContainerInterface $container)
{
$cache_dir = $container->getParameter('kernel.cache_dir');
//Here the cached structure will be saved.