Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 369-380 (lines=12) @@
366
						}
367
						
368
						//si ok on affiche le batiment
369
						if ($ok_construction === true) {
370
							$ressource = $this->getRessourceConstruireBatiment($this->all_batiment[$i], 0);
371
							
372
							$batiment_construire[] = [
373
								"nom_batiment_sql" => $this->all_batiment[$i],
374
								"nom_batiment" => $this->all_batiment_nom[$i],
375
								"ressource" => $ressource,
376
								"temps_construction" => $temps_construction,
377
								"width" => $taille_batiment[0],
378
								"height" => $taille_batiment[1]
379
							];
380
						}
381
					}
382
					else {
383
						$ressource = $this->getRessourceConstruireBatiment($this->all_batiment[$i], 0);
@@ 382-393 (lines=12) @@
379
							];
380
						}
381
					}
382
					else {
383
						$ressource = $this->getRessourceConstruireBatiment($this->all_batiment[$i], 0);
384
385
						$batiment_construire[] = [
386
							"nom_batiment_sql" => $this->all_batiment[$i],
387
							"nom_batiment" => $this->all_batiment_nom[$i],
388
							"ressource" => $ressource,
389
							"temps_construction" => $temps_construction,
390
							"width" => $taille_batiment[0],
391
							"height" => $taille_batiment[1]
392
						];
393
					}
394
				}
395
			}
396
			Bataille::setValues(["batiments_construire" => $batiment_construire]);