@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | echo $this->date_arrivee."<br>"; |
65 | 65 | |
66 | 66 | //on test si déja arrivé à destination |
67 | - if (($this->aller == 1) && (($this->date_arrivee-$today) <= 0)) {echo("dgd"); |
|
67 | + if (($this->aller == 1) && (($this->date_arrivee - $today) <= 0)) {echo("dgd"); |
|
68 | 68 | $this->setLivrerRessource(); |
69 | 69 | |
70 | 70 | //on calcul la date d'arrivée du retour |
71 | - $date_retour = Bataille::getDureeTrajet($this->id_base_dest)+$this->date_arrivee; |
|
71 | + $date_retour = Bataille::getDureeTrajet($this->id_base_dest) + $this->date_arrivee; |
|
72 | 72 | |
73 | 73 | echo "date retour = ".$date_retour; |
74 | 74 | |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | |
83 | 83 | |
84 | 84 | } |
85 | - else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) { |
|
85 | + else if (($this->aller == 0) && (($this->date_arrivee - $today) <= 0)) { |
|
86 | 86 | |
87 | 87 | } |
88 | 88 | else { |
89 | - $this->duree_restante_trajet = $this->date_arrivee-$today; |
|
89 | + $this->duree_restante_trajet = $this->date_arrivee - $today; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
@@ -38,8 +38,7 @@ discard block |
||
38 | 38 | "date_arrivee" => $this->duree_restante_trajet, |
39 | 39 | "nom_base_dest" => $obj->nom_base |
40 | 40 | ]; |
41 | - } |
|
42 | - else { |
|
41 | + } else { |
|
43 | 42 | $marche["retour"][] = [ |
44 | 43 | "id_marche_transport" => $obj->ID_marche_transport, |
45 | 44 | "date_arrivee" => $this->duree_restante_trajet, |
@@ -75,17 +74,14 @@ discard block |
||
75 | 74 | //si le retour du trajet est également arrivé on finit le transport |
76 | 75 | if ($date_retour < $today) { |
77 | 76 | $this->setTerminerTransport(); |
78 | - } |
|
79 | - else { |
|
77 | + } else { |
|
80 | 78 | |
81 | 79 | } |
82 | 80 | |
83 | 81 | |
84 | - } |
|
85 | - else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) { |
|
82 | + } else if (($this->aller == 0) && (($this->date_arrivee-$today) <= 0)) { |
|
86 | 83 | |
87 | - } |
|
88 | - else { |
|
84 | + } else { |
|
89 | 85 | $this->duree_restante_trajet = $this->date_arrivee-$today; |
90 | 86 | } |
91 | 87 | } |