Skip to content

Commit

Permalink
fix stan
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Dec 4, 2023
1 parent d7794af commit 0705fc5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 48 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/Entity/MediaTrait/MediaTrait.php
Expand Up @@ -32,7 +32,7 @@ trait MediaTrait
protected string $projectDir = '';

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, name: 'media')]
protected ?string $media = null;
protected ?string $media = null; // @phpstan-ignore-line

// TODO Rename to filename

Expand All @@ -42,7 +42,7 @@ trait MediaTrait
protected ?string $mediaBeforeUpdate = null;

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 50)]
protected ?string $mimeType = null;
protected ?string $mimeType = null; // @phpstan-ignore-line

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
protected int $size;
Expand All @@ -54,10 +54,10 @@ trait MediaTrait
protected $mediaFile;

/**
* @var Collection<int, PageInterface>|null
* @var Collection<int, PageInterface>
*/
#[ORM\OneToMany(targetEntity: PageInterface::class, mappedBy: 'mainImage')]
protected ?Collection $mainImagePages = null;
protected ?Collection $mainImagePages = null; // @phpstan-ignore-line TODO drop PageInterface

public function setProjectDir(string $projectDir): self
{
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Entity/PageTrait/PageEditorTrait.php
Expand Up @@ -10,7 +10,7 @@
trait PageEditorTrait
{
#[ORM\ManyToOne(targetEntity: UserInterface::class)]
protected ?UserInterface $editedBy = null;
protected ?UserInterface $editedBy = null; // @phpstan-ignore-line

/*
* @ORM\OneToMany(
Expand All @@ -25,7 +25,7 @@ trait PageEditorTrait
/**/

#[ORM\ManyToOne(targetEntity: UserInterface::class)]
protected ?UserInterface $createdBy = null;
protected ?UserInterface $createdBy = null; // @phpstan-ignore-line

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => ''])]
protected string $editMessage = '';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Entity/PageTrait/PageExtendedTrait.php
Expand Up @@ -8,7 +8,7 @@
trait PageExtendedTrait
{
#[ORM\ManyToOne(targetEntity: \Pushword\Core\Entity\PageInterface::class)]
protected ?PageInterface $extendedPage = null;
protected ?PageInterface $extendedPage = null; // @phpstan-ignore-line

public function getExtendedPage(): ?PageInterface
{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Entity/PageTrait/PageI18nTrait.php
Expand Up @@ -19,7 +19,7 @@ trait PageI18nTrait
* @var Collection<string, PageInterface>|null
*/
#[ORM\ManyToMany(targetEntity: \Pushword\Core\Entity\PageInterface::class)]
protected ?Collection $translations = null;
protected ?Collection $translations = null; // @phpstan-ignore-line

public function getLocale(): string
{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Entity/PageTrait/PageMainImageTrait.php
Expand Up @@ -8,7 +8,7 @@
trait PageMainImageTrait
{
#[ORM\ManyToOne(targetEntity: \Pushword\Core\Entity\MediaInterface::class, cascade: ['persist'], inversedBy: 'mainImagePages')]
protected ?MediaInterface $mainImage = null;
protected ?MediaInterface $mainImage = null; // @phpstan-ignore-line

public function getMainImage(): ?MediaInterface
{
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Entity/PageTrait/PageParentTrait.php
Expand Up @@ -11,14 +11,14 @@
trait PageParentTrait
{
#[ORM\ManyToOne(targetEntity: PageInterface::class, inversedBy: 'childrenPages')]
protected ?PageInterface $parentPage = null;
protected ?PageInterface $parentPage = null; // @phpstan-ignore-line

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

public function getParentPage(): ?PageInterface
{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Entity/PageTrait/PageTrait.php
Expand Up @@ -21,7 +21,7 @@ trait PageTrait
protected string $mainContent = '';

#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, options: ['default' => 'CURRENT_TIMESTAMP'])]
protected ?\DateTimeInterface $publishedAt = null;
protected ?\DateTimeInterface $publishedAt = null; // @phpstan-ignore-line

public function __toString(): string
{
Expand Down
36 changes: 0 additions & 36 deletions phpunit.xml.dist.bak

This file was deleted.

0 comments on commit 0705fc5

Please sign in to comment.