mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: fix phpstan issues
This commit is contained in:
@@ -66,22 +66,6 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
private function createAddress(): ObjectSet
|
||||
{
|
||||
$loader = new NativeLoader();
|
||||
|
||||
return $loader->loadData([
|
||||
Address::class => [
|
||||
'address1' => [
|
||||
'name' => '<fr_FR:company()>',
|
||||
'telephone' => $this->phoneNumberUtil->getExampleNumber('FR'),
|
||||
'email' => '<email()>',
|
||||
'comment' => '<fr_FR:realTextBetween(10, 500)>',
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
private function getCenters(): Iterator
|
||||
{
|
||||
$references = array_map(
|
||||
|
@@ -23,6 +23,7 @@ use DateTimeImmutable;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\ReadableCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use Symfony\Component\Serializer\Annotation\Context;
|
||||
@@ -153,7 +154,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\OneToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty", mappedBy="parent",
|
||||
* cascade={"persist"}, orphanRemoval=true)
|
||||
*
|
||||
* @var Collection|ThirdParty[]
|
||||
* @var Collection<(int|string), ThirdParty>
|
||||
* @Assert\Valid(traverse=true)
|
||||
*/
|
||||
private Collection $children;
|
||||
@@ -400,7 +401,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* Get the children where active = true.
|
||||
*/
|
||||
public function getActiveChildren(): Collection
|
||||
public function getActiveChildren(): ReadableCollection
|
||||
{
|
||||
return $this->children->filter(static fn (ThirdParty $tp) => $tp->getActive());
|
||||
}
|
||||
|
Reference in New Issue
Block a user