Commit 62feb8e3 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

[FIX] Correction signature de méthode : null peut être retourné

parent 410fd541
Loading
Loading
Loading
Loading
+8 −8
Changes for module/Application/src/Application/Entity/Db/Etablissement.php: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -88,11 +88,11 @@ class Etablissement
    }

    /**
     * Retourne le code de cet établissement, ex: 0761904GE' pour l'Université de Rouen.
     * Retourne le code de cet établissement ou null, ex: '0761904GE' pour l'Université de Rouen.
     *
     * @return string
     * @return string|null
     */
    public function getCode(): string
    public function getCode(): ?string
    {
        return $this->code;
    }
@@ -171,17 +171,17 @@ class Etablissement
    }

    /**
     * @return string
     * @return string|null
     */
    public function getSigle()
    public function getSigle(): ?string
    {
        return $this->getStructure()->getSigle();
    }

    /**
     * @param string $sigle
     * @param string|null $sigle
     */
    public function setSigle($sigle)
    public function setSigle(string $sigle = null)
    {
        $this->getStructure()->setSigle($sigle);
    }
@@ -335,7 +335,7 @@ class Etablissement
     */
    public function createSearchFilterValueOption(): array
    {
        $label = $this->getCode();
        $label = ($this->getCode() ?: $this->getSigle()) ?: $this->getLibelle();
        if ($this->getStructure()->estFermee()) {
            $label .= "  FERMÉ";
        }
+3 −3
Changes for module/Application/src/Application/Entity/Db/Structure.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ class Structure implements StructureInterface, HistoriqueAwareInterface, SourceA
     *
     * @return string
     */
    public function getCode()
    public function getCode(): string
    {
//        if ($this->code !== null) return $this->code;
//        if ($this->sourceCode !== null) {
@@ -211,9 +211,9 @@ class Structure implements StructureInterface, HistoriqueAwareInterface, SourceA
    }

    /**
     * @return string
     * @return string|null
     */
    public function getSigle()
    public function getSigle(): ?string
    {
        return $this->sigle;
    }