mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Cherry-pick phpstan fixes after rector changes
This commit is contained in:
@@ -21,6 +21,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Order;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Exception;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
@@ -64,7 +65,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
public array $futureDestUsers = [];
|
||||
|
||||
/**
|
||||
* @var Collection<EntityWorkflowComment>
|
||||
* @var Collection<int, \Chill\MainBundle\Entity\Workflow\EntityWorkflowComment>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: EntityWorkflowComment::class, mappedBy: 'entityWorkflow', orphanRemoval: true)]
|
||||
private Collection $comments;
|
||||
@@ -81,12 +82,12 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
private int $relatedEntityId;
|
||||
|
||||
/**
|
||||
* @var Collection<EntityWorkflowStep>
|
||||
* @var ArrayCollection<int, EntityWorkflowStep>
|
||||
*/
|
||||
#[Assert\Valid(traverse: true)]
|
||||
#[ORM\OneToMany(targetEntity: EntityWorkflowStep::class, mappedBy: 'entityWorkflow', orphanRemoval: true, cascade: ['persist'])]
|
||||
#[ORM\OneToMany(mappedBy: 'entityWorkflow', targetEntity: EntityWorkflowStep::class, cascade: ['persist'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['transitionAt' => \Doctrine\Common\Collections\Criteria::ASC, 'id' => 'ASC'])]
|
||||
private Collection $steps;
|
||||
private ArrayCollection $steps;
|
||||
|
||||
/**
|
||||
* @var array|EntityWorkflowStep[]|null
|
||||
@@ -94,14 +95,14 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
private ?array $stepsChainedCache = null;
|
||||
|
||||
/**
|
||||
* @var Collection<User>
|
||||
* @var Collection<int, User>
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
#[ORM\JoinTable(name: 'chill_main_workflow_entity_subscriber_to_final')]
|
||||
private Collection $subscriberToFinal;
|
||||
|
||||
/**
|
||||
* @var Collection<User>
|
||||
* @var Collection<int, User>
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
#[ORM\JoinTable(name: 'chill_main_workflow_entity_subscriber_to_step')]
|
||||
@@ -276,6 +277,9 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->steps;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getStepsChained(): array
|
||||
{
|
||||
if (\is_array($this->stepsChainedCache)) {
|
||||
|
Reference in New Issue
Block a user