mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fixed some higher level PHPstan issues.
This commit is contained in:
parent
f2f5e0b76e
commit
3328dd968d
9 changed files with 12 additions and 11 deletions
|
@ -96,7 +96,7 @@ abstract class BaseAdminController extends AbstractController
|
||||||
protected $timeTravel;
|
protected $timeTravel;
|
||||||
protected $dataTableFactory;
|
protected $dataTableFactory;
|
||||||
/**
|
/**
|
||||||
* @var EventDispatcher
|
* @var EventDispatcher|EventDispatcherInterface
|
||||||
*/
|
*/
|
||||||
protected $eventDispatcher;
|
protected $eventDispatcher;
|
||||||
protected $labelGenerator;
|
protected $labelGenerator;
|
||||||
|
|
|
@ -73,7 +73,7 @@ class UserSettingsController extends AbstractController
|
||||||
{
|
{
|
||||||
protected $demo_mode;
|
protected $demo_mode;
|
||||||
/**
|
/**
|
||||||
* @var EventDispatcher
|
* @var EventDispatcher|EventDispatcherInterface
|
||||||
*/
|
*/
|
||||||
protected $eventDispatcher;
|
protected $eventDispatcher;
|
||||||
|
|
||||||
|
|
|
@ -51,14 +51,14 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||||
trait TimestampTrait
|
trait TimestampTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var DateTime the date when this element was modified the last time
|
* @var DateTime|null the date when this element was modified the last time
|
||||||
* @ORM\Column(type="datetime", name="last_modified", options={"default"="CURRENT_TIMESTAMP"})
|
* @ORM\Column(type="datetime", name="last_modified", options={"default"="CURRENT_TIMESTAMP"})
|
||||||
* @Groups({"extended", "full"})
|
* @Groups({"extended", "full"})
|
||||||
*/
|
*/
|
||||||
protected $lastModified;
|
protected $lastModified;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DateTime the date when this element was created
|
* @var DateTime|null the date when this element was created
|
||||||
* @ORM\Column(type="datetime", name="datetime_added", options={"default"="CURRENT_TIMESTAMP"})
|
* @ORM\Column(type="datetime", name="datetime_added", options={"default"="CURRENT_TIMESTAMP"})
|
||||||
* @Groups({"extended", "full"})
|
* @Groups({"extended", "full"})
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,7 +39,7 @@ trait ParametersTrait
|
||||||
/**
|
/**
|
||||||
* Return all associated specifications.
|
* Return all associated specifications.
|
||||||
*
|
*
|
||||||
* @psalm-return Collection<int, PartParameter>
|
* @psalm-return Collection<int, AbstractParameter>
|
||||||
*/
|
*/
|
||||||
public function getParameters(): Collection
|
public function getParameters(): Collection
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,7 +77,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
|
||||||
public const PRICE_PRECISION = 5;
|
public const PRICE_PRECISION = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The price related to the detail. (Given in the selected currency)
|
* @var BigDecimal The price related to the detail. (Given in the selected currency)
|
||||||
* @ORM\Column(type="big_decimal", precision=11, scale=5)
|
* @ORM\Column(type="big_decimal", precision=11, scale=5)
|
||||||
* @BigDecimalPositive()
|
* @BigDecimalPositive()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -71,7 +71,7 @@ final class RegisterU2FSubscriber implements EventSubscriberInterface
|
||||||
private $router;
|
private $router;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var EventDispatcher
|
* @var EventDispatcher|EventDispatcherInterface
|
||||||
*/
|
*/
|
||||||
private $eventDispatcher;
|
private $eventDispatcher;
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ class BaseEntityAdminForm extends AbstractType
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
{
|
{
|
||||||
/** @var AbstractStructuralDBElement $entity */
|
/** @var AbstractStructuralDBElement|LabelProfile|AbstractNamedDBElement $entity */
|
||||||
$entity = $options['data'];
|
$entity = $options['data'];
|
||||||
$is_new = null === $entity->getID();
|
$is_new = null === $entity->getID();
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class BigDecimalType extends Type
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string|null $value
|
||||||
*
|
*
|
||||||
* @return BigDecimal|\Brick\Math\BigNumber|mixed
|
* @return BigDecimal|\Brick\Math\BigNumber|mixed
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,7 @@ class BigDecimalType extends Type
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param BigDecimal $value
|
* @param BigDecimal|null $value
|
||||||
*/
|
*/
|
||||||
public function convertToDatabaseValue($value, AbstractPlatform $platform)
|
public function convertToDatabaseValue($value, AbstractPlatform $platform)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,6 +26,7 @@ use App\Entity\Parts\Manufacturer;
|
||||||
use App\Entity\Parts\MeasurementUnit;
|
use App\Entity\Parts\MeasurementUnit;
|
||||||
use App\Entity\Parts\Part;
|
use App\Entity\Parts\Part;
|
||||||
use App\Repository\DBElementRepository;
|
use App\Repository\DBElementRepository;
|
||||||
|
use App\Repository\PartRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
@ -52,7 +53,7 @@ final class PartsTableActionHandler
|
||||||
{
|
{
|
||||||
$id_array = explode(',', $ids);
|
$id_array = explode(',', $ids);
|
||||||
|
|
||||||
/** @var DBElementRepository $repo */
|
/** @var PartRepository $repo */
|
||||||
$repo = $this->entityManager->getRepository(Part::class);
|
$repo = $this->entityManager->getRepository(Part::class);
|
||||||
|
|
||||||
return $repo->getElementsFromIDArray($id_array);
|
return $repo->getElementsFromIDArray($id_array);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue