Commit be3fe38c authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

WIP

parent fe095e25
Loading
Loading
Loading
Loading
−178

File deleted.

+2 −3
Changes for module/Application/src/Application/Entity/Db/FicheMetier.php: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Application\Entity\Db;

use Doctrine\Common\Collections\Collection;
use Element\Entity\Db\ApplicationElement;
use Element\Entity\Db\Competence;
use Element\Entity\Db\CompetenceElement;
@@ -24,13 +25,11 @@ class FicheMetier implements HistoriqueAwareInterface, HasEtatInterface,
    use HasApplicationCollectionTrait;
    use HasCompetenceCollectionTrait;

    /** @var int */
    private ?int $id = -1;
    private ?Metier $metier = null;
    private ?bool $hasExpertise = false;

    /** @var ArrayCollection */
    private $activites;
    private Collection $activites;

    public function __construct()
    {
+10 −32
Changes for module/Application/src/Application/Entity/Db/FicheposteApplicationRetiree.php: 10 added lines, 32 removed lines.
Original line number Diff line number Diff line
@@ -2,61 +2,39 @@

namespace Application\Entity\Db;

use Element\Entity\Db\Application;
use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;

class FicheposteApplicationRetiree implements HistoriqueAwareInterface {
    use HistoriqueAwareTrait;

    /** @var integer */
    private $id;
    /** @var FichePoste */
    private $fichePoste;
    /** @var Application */
    private $application;

    /**
     * @return int
     */
    public function getId()
    private ?int $id = null;
    private ?FichePoste $fichePoste = null;
    private ?Application $application = null;

    public function getId() : ?int
    {
        return $this->id;
    }

    /**
     * @return FichePoste
     */
    public function getFichePoste()
    public function getFichePoste() : ?FichePoste
    {
        return $this->fichePoste;
    }

    /**
     * @param FichePoste $fichePoste
     * @return FicheposteApplicationRetiree
     */
    public function setFichePoste($fichePoste)
    public function setFichePoste(?FichePoste $fichePoste) : void
    {
        $this->fichePoste = $fichePoste;
        return $this;
    }


    /**
     * @return Application
     */
    public function getApplication()
    public function getApplication() : ?Application
    {
        return $this->application;
    }

    /**
     * @param Application $application
     * @return FicheposteApplicationRetiree
     */
    public function setApplication($application)
    public function setApplication(?Application $application) : void
    {
        $this->application = $application;
        return $this;
    }
}
 No newline at end of file
−92

File deleted.

+6 −15
Changes for module/Element/src/Element/Entity/Db/Traits/HasApplicationCollectionTrait.php: 6 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -2,25 +2,20 @@

namespace Element\Entity\Db\Traits;

use Doctrine\Common\Collections\Collection;
use Element\Entity\Db\Application;
use Element\Entity\Db\ApplicationElement;
use Doctrine\Common\Collections\ArrayCollection;

trait HasApplicationCollectionTrait
{

    /** @var ArrayCollection */
    private $applications;
    private Collection $applications;

    public function getApplicationCollection()
    public function getApplicationCollection() : Collection
    {
        return $this->applications;
    }

    /**
     * @param bool $avecHisto
     * @return ApplicationElement[]
     */
    public function getApplicationListe(bool $avecHisto = false): array
    {
        $applications = [];
@@ -31,7 +26,7 @@ trait HasApplicationCollectionTrait
        return $applications;
    }

    public function getApplicationDictionnaire()
    public function getApplicationDictionnaire() : array
    {
        $dictionnaire = [];
        foreach ($this->applications as $applicationElement) {
@@ -44,10 +39,6 @@ trait HasApplicationCollectionTrait
        return $dictionnaire;
    }

    /**
     * @param Application $application
     * @return ApplicationElement|null
     */
    public function hasApplication(Application $application): ?ApplicationElement
    {
        /** @var ApplicationElement $applicationElement */
@@ -57,12 +48,12 @@ trait HasApplicationCollectionTrait
        return null;
    }

    public function addApplicationElement(ApplicationElement $element)
    public function addApplicationElement(ApplicationElement $element) : void
    {
        $this->applications->add($element);
    }

    public function removeApplicationElement(ApplicationElement $element)
    public function removeApplicationElement(ApplicationElement $element) : void
    {
        $this->applications->removeElement($element);
    }