Conditions | 2 |
Paths | 2 |
Total Lines | 26 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
15 | public function readAction($id = null){ |
||
16 | $projet = Projet::findFirst($id); |
||
17 | $usecases = Usecase::find("idProjet = $id"); |
||
18 | |||
19 | //Calcul le taux de finition du projet en fonction du nombre d'usecases total et du % fini sur chaque usecases. |
||
20 | $countUsecases = count($usecases); |
||
21 | $totalAvancementFini = $countUsecases*100; |
||
22 | $totalAvancementReel = 0; |
||
23 | |||
24 | foreach($usecases as $u){ |
||
25 | $totalAvancementReel = $totalAvancementReel + $u->getAvancement(); |
||
26 | } |
||
27 | $avancementReel = ($totalAvancementReel / $totalAvancementFini)*100; |
||
28 | $avancementReel = number_format($avancementReel,1); |
||
29 | |||
30 | $this->view->setVar("projet",$projet); |
||
31 | $this->view->setVar("usecases",$usecases); |
||
32 | $this->view->setVar("avancement",$avancementReel); |
||
33 | |||
34 | //Création de la progressbar |
||
35 | $progress= $this->jquery->bootstrap()->htmlProgressbar("progress","info",$avancementReel); |
||
36 | $progress->showcaption(true); |
||
37 | echo $this->jquery->compile($this->view); |
||
38 | |||
39 | |||
40 | } |
||
41 | } |
||
42 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.