array("regexp"=>"([0-9]|([A-F]|[a-f])){6}"))); } public static function validerEffectuationTache($estFait) { return filter_var($estFait, FILTER_VALIDATE_BOOL); } public static function netoyerEtValiderTache(string $nom, string $comm, string $couleur, $estFait) { $nom = self::netoyerNomTache($nom); $comm = self::netoyerCommentaireTache($comm); $couleurValide = self::validerCouleurTache($couleur); $estFaitValide = self::validerEffectuationTache($estFait); return array( 'nom' => $nom, 'commentaire' => $comm, 'couleur' => $couleurValide, 'estFait' => $estFaitValide ); } }