Corrction de la classe Enigme

ServeurDeTest
Johan LACHENAL 2 years ago
parent ca99c45b5e
commit c6f75c110f

@ -3,7 +3,6 @@
class Enigme
{
private string $idEnigme;
private string $admin;
private string $enonce;
private string $aide;
private string $rappel;
@ -13,7 +12,6 @@ class Enigme
/**
* @param string $idEnigme
* @param string $admin
* @param string $enonce
* @param string $aide
* @param string $rappel
@ -21,17 +19,31 @@ class Enigme
* @param string $test
* @param int $tempsDeResolution
*/
public function __construct(string $idEnigme, string $admin, string $enonce, string $aide, string $rappel, string $solution, string $test, int $tempsDeResolution)
public function __construct(string $idEnigme, string $enonce, string $aide, string $rappel, string $solution, string $test, int $tempsDeResolution)
{
$this->idEnigme = $idEnigme;
$this->admin = $admin;
$this->enonce = $enonce;
$this->aide = $aide;
$this->rappel = $rappel;
$this->solution = $solution;
$this->test = $test;
$this->tempsDeResolution = $tempsDeResolution;
$arguments=func_get_args();
$index=func_num_args();
if(method_exists($this,$function='__construct'.$index));
call_user_func(array(array($this,$function),$arguments));
}
public function __constructMulti(string $idEnigme, string $enonce, string $solution, string $test, int $tempsDeResolution){
$this->idEnigme=$idEnigme;
$this->enonce=$enonce;
$this->solution=$solution;
$this->test=$test;
$this->tempsDeResolution=$tempsDeResolution;
}
public function __constructSolo(string $idEnigme, string $enonce, string $aide, string $rappel, string $solution, string $test){
$this->idEnigme=$idEnigme;
$this->enonce=$enonce;
$this->aide=$aide;
$this->rappel=$rappel;
$this->solution=$solution;
$this->test=$test;
}
/**
* @return string
*/
@ -48,22 +60,6 @@ class Enigme
$this->idEnigme = $idEnigme;
}
/**
* @return string
*/
public function getAdmin(): string
{
return $this->admin;
}
/**
* @param string $admin
*/
public function setAdmin(string $admin): void
{
$this->admin = $admin;
}
/**
* @return string
*/

Loading…
Cancel
Save