Code Duplication    Length = 5-5 lines in 2 locations

modules/bataille/app/controller/Batiment.php 2 locations

@@ 532-536 (lines=5) @@
529
						->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment)
530
						->get();
531
532
					if ((is_array($query)) && (count($query) > 0)){
533
						foreach ($query as $obj) {
534
							$this->info_batiment = $xml->$nom_batiment_sql->phrase.$obj->$champ.$xml->$nom_batiment_sql->complement;
535
						}
536
					}
537
538
					//récupération de la phrase pour le niveau suivant
539
					$query = $dbc1->select($xml->$nom_batiment_sql->champ)
@@ 544-548 (lines=5) @@
541
						->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment+1)
542
						->get();
543
544
					if ((is_array($query)) && (count($query) > 0)){
545
						foreach ($query as $obj) {
546
							$this->info_batiment_next = $xml->$nom_batiment_sql->phrase_suivant.$obj->$champ.$xml->$nom_batiment_sql->complement;
547
						}
548
					}
549
				}
550
				else {
551
					$this->info_batiment = "";