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
|
||||
|
||||
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;
|
||||
|
||||
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||
@ -11,7 +20,6 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
@ -23,31 +31,31 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
||||
use TrackUpdateTrait;
|
||||
|
||||
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private CommentEmbeddable $comment;
|
||||
|
||||
#[ORM\Column(type: 'text', nullable: true)]
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private ?string $freeText = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: PersonResourceKind::class, inversedBy: 'personResources')]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private ?PersonResourceKind $kind = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private ?Person $person = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'resources')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
#[Serializer\Groups(['read'])]
|
||||
#[Groups(['read'])]
|
||||
private ?Person $personOwner = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'personResources')]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
private ?ThirdParty $thirdParty = null;
|
||||
|
||||
public function __construct()
|
||||
@ -187,5 +195,4 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
||||
->addViolation();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,17 +12,10 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Entity\Person;
|
||||
|
||||
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||
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 Symfony\Component\Serializer\Annotation as Serializer;
|
||||
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])]
|
||||
#[ORM\Entity]
|
||||
|
Loading…
x
Reference in New Issue
Block a user