mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Run php-cs-fixer and rector
This commit is contained in:
parent
7eee995627
commit
85811cc6ae
@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Chill\PersonBundle\Entity\Person;
|
namespace Chill\PersonBundle\Entity\Person;
|
||||||
|
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||||
@ -11,7 +20,6 @@ use Chill\PersonBundle\Entity\Person;
|
|||||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
|
||||||
use Symfony\Component\Serializer\Annotation\Groups;
|
use Symfony\Component\Serializer\Annotation\Groups;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
@ -23,31 +31,31 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
|||||||
use TrackUpdateTrait;
|
use TrackUpdateTrait;
|
||||||
|
|
||||||
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
|
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
private CommentEmbeddable $comment;
|
private CommentEmbeddable $comment;
|
||||||
|
|
||||||
#[ORM\Column(type: 'text', nullable: true)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
private ?string $freeText = null;
|
private ?string $freeText = null;
|
||||||
|
|
||||||
#[ORM\ManyToOne(targetEntity: PersonResourceKind::class, inversedBy: 'personResources')]
|
#[ORM\ManyToOne(targetEntity: PersonResourceKind::class, inversedBy: 'personResources')]
|
||||||
#[ORM\JoinColumn(nullable: true)]
|
#[ORM\JoinColumn(nullable: true)]
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
private ?PersonResourceKind $kind = null;
|
private ?PersonResourceKind $kind = null;
|
||||||
|
|
||||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||||
#[ORM\JoinColumn(nullable: true)]
|
#[ORM\JoinColumn(nullable: true)]
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
private ?Person $person = null;
|
private ?Person $person = null;
|
||||||
|
|
||||||
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'resources')]
|
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'resources')]
|
||||||
#[ORM\JoinColumn(nullable: false)]
|
#[ORM\JoinColumn(nullable: false)]
|
||||||
#[Serializer\Groups(['read'])]
|
#[Groups(['read'])]
|
||||||
private ?Person $personOwner = null;
|
private ?Person $personOwner = null;
|
||||||
|
|
||||||
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'personResources')]
|
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'personResources')]
|
||||||
#[ORM\JoinColumn(nullable: true)]
|
#[ORM\JoinColumn(nullable: true)]
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
private ?ThirdParty $thirdParty = null;
|
private ?ThirdParty $thirdParty = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -187,5 +195,4 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
|||||||
->addViolation();
|
->addViolation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,17 +12,10 @@ declare(strict_types=1);
|
|||||||
namespace Chill\PersonBundle\Entity\Person;
|
namespace Chill\PersonBundle\Entity\Person;
|
||||||
|
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
|
||||||
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
|
||||||
use Chill\PersonBundle\Entity\Person;
|
|
||||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
use Symfony\Component\Serializer\Annotation\Groups;
|
use Symfony\Component\Serializer\Annotation\Groups;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
|
||||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|
||||||
|
|
||||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['personResource' => PersonResource::class])]
|
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['personResource' => PersonResource::class])]
|
||||||
#[ORM\Entity]
|
#[ORM\Entity]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user