Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 353-364 (lines=12) @@
350
						}
351
352
						//si ok on affiche le batiment
353
						if ($ok_construction === true) {
354
							$ressource = $this->getRessourceConstruireBatiment($all_batiment[$i], 0);
355
356
							$batiment_construire[] = [
357
								"nom_batiment_sql" => $all_batiment[$i],
358
								"nom_batiment" => $all_batiment_nom[$i],
359
								"ressource" => $ressource,
360
								"temps_construction" => $temps_construction,
361
								"width" => $taille_batiment[0],
362
								"height" => $taille_batiment[1]
363
							];
364
						}
365
					}
366
					else {
367
						$ressource = $this->getRessourceConstruireBatiment($all_batiment[$i], 0);
@@ 366-377 (lines=12) @@
363
							];
364
						}
365
					}
366
					else {
367
						$ressource = $this->getRessourceConstruireBatiment($all_batiment[$i], 0);
368
369
						$batiment_construire[] = [
370
							"nom_batiment_sql" => $all_batiment[$i],
371
							"nom_batiment" => $all_batiment_nom[$i],
372
							"ressource" => $ressource,
373
							"temps_construction" => $temps_construction,
374
							"width" => $taille_batiment[0],
375
							"height" => $taille_batiment[1]
376
						];
377
					}
378
				}
379
			}
380
			Bataille::setValues(["batiments_construire" => $batiment_construire]);