Skip to content

Commit

Permalink
fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Sep 25, 2023
1 parent 5b15e72 commit 8a8c64b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/Entity/MediaTrait/MediaTrait.php
Expand Up @@ -2,6 +2,7 @@

namespace Pushword\Core\Entity\MediaTrait;

use App\Entity\Media;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Pushword\Core\Entity\PageInterface;
Expand Down Expand Up @@ -52,12 +53,11 @@ trait MediaTrait
#[Vich\UploadableField(mapping: 'media_media', fileNameProperty: 'slug', mimeType: 'mimeType', size: 'size', dimensions: 'dimensions')]
protected $mediaFile;

// todo Rename to $file
/**
* @var \Doctrine\Common\Collections\Collection<\Pushword\Core\Entity\PageInterface>|null
* @var Collection<int, PageInterface>|null
*/
#[ORM\OneToMany(targetEntity: PageInterface::class, mappedBy: 'mainImage')]
protected ?Collection $mainImagePages = null; // @phpstan-ignore-line
protected ?Collection $mainImagePages = null;

public function setProjectDir(string $projectDir): self
{
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Entity/PageTrait/PageParentTrait.php
Expand Up @@ -14,11 +14,11 @@ trait PageParentTrait
protected ?PageInterface $parentPage = null;

/**
* @var ?Collection<PageInterface>
* @var ?Collection<int, PageInterface>
*/
#[ORM\OneToMany(targetEntity: PageInterface::class, mappedBy: 'parentPage')]
#[ORM\OrderBy(['publishedAt' => Criteria::DESC, 'priority' => 'DESC'])]
protected ?Collection $childrenPages; // @phpstan-ignore-line
protected ?Collection $childrenPages;

public function getParentPage(): ?PageInterface
{
Expand Down

0 comments on commit 8a8c64b

Please sign in to comment.