mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 12:40:08 +02:00
Started to increase the phpstan level
This commit is contained in:
parent
71cd4057a7
commit
fc3290271c
29 changed files with 119 additions and 55 deletions
|
@ -31,13 +31,17 @@ use Doctrine\Common\Collections\Collection;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* @template-covariant AT of Attachment
|
||||
*/
|
||||
#[ORM\MappedSuperclass]
|
||||
abstract class AttachmentContainingDBElement extends AbstractNamedDBElement implements HasMasterAttachmentInterface, HasAttachmentsInterface
|
||||
{
|
||||
use MasterAttachmentTrait;
|
||||
|
||||
/**
|
||||
* @var Attachment[]|Collection
|
||||
* @var Collection<int, Attachment>
|
||||
* @phpstan-var Collection<int, AT>
|
||||
* ORM Mapping is done in subclasses (e.g. Part)
|
||||
*/
|
||||
#[Groups(['full'])]
|
||||
|
@ -76,7 +80,7 @@ abstract class AttachmentContainingDBElement extends AbstractNamedDBElement impl
|
|||
/**
|
||||
* Gets all attachments associated with this element.
|
||||
*
|
||||
* @return Attachment[]|Collection
|
||||
* @return Collection<Attachment>
|
||||
*/
|
||||
public function getAttachments(): Collection
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue