Fixed PHPstan issues

This commit is contained in:
Jan Böhmer 2024-06-22 16:53:59 +02:00
parent 5074e2beac
commit 002d29a53e
4 changed files with 3 additions and 6 deletions

View file

@ -86,9 +86,6 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ApiFilter(OrderFilter::class, properties: ['name', 'id', 'addedDate', 'lastModified'])] #[ApiFilter(OrderFilter::class, properties: ['name', 'id', 'addedDate', 'lastModified'])]
class AttachmentType extends AbstractStructuralDBElement class AttachmentType extends AbstractStructuralDBElement
{ {
/**
* @var Collection<int, \App\Entity\Attachments\AttachmentType>
*/
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: AttachmentType::class, cascade: ['persist'])] #[ORM\OneToMany(mappedBy: 'parent', targetEntity: AttachmentType::class, cascade: ['persist'])]
#[ORM\OrderBy(['name' => Criteria::ASC])] #[ORM\OrderBy(['name' => Criteria::ASC])]
protected Collection $children; protected Collection $children;

View file

@ -59,7 +59,7 @@ abstract class AbstractLogEntry extends AbstractDBElement
* @var \DateTimeInterface The datetime the event associated with this log entry has occured * @var \DateTimeInterface The datetime the event associated with this log entry has occured
*/ */
#[ORM\Column(name: 'datetime', type: Types::DATETIME_MUTABLE)] #[ORM\Column(name: 'datetime', type: Types::DATETIME_MUTABLE)]
protected \DateTime $timestamp; protected \DateTimeInterface $timestamp;
/** /**
* @var LogLevel The priority level of the associated level. 0 is highest, 7 lowest * @var LogLevel The priority level of the associated level. 0 is highest, 7 lowest

View file

@ -105,7 +105,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
protected string $comment = ''; protected string $comment = '';
/** /**
* @var \DateTimeInterface|null Set a time until when the lot must be used. * @var \DateTime|null Set a time until when the lot must be used.
* Set to null, if the lot can be used indefinitely. * Set to null, if the lot can be used indefinitely.
*/ */
#[Groups(['extended', 'full', 'import', 'part_lot:read', 'part_lot:write'])] #[Groups(['extended', 'full', 'import', 'part_lot:read', 'part_lot:write'])]

View file

@ -318,7 +318,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
protected ?PermissionData $permissions = null; protected ?PermissionData $permissions = null;
/** /**
* @var \DateTimeInterface|null the time until the password reset token is valid * @var \DateTime|null the time until the password reset token is valid
*/ */
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
protected ?\DateTime $pw_reset_expires = null; protected ?\DateTime $pw_reset_expires = null;