| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function deleteAction($id = null){ |
||
| 23 | $object = Usecase::findFirst("id = $id"); |
||
| 24 | $codeUseCase = $object->getCode(); |
||
| 25 | $taches = Tache::find("codeUseCase = '$codeUseCase'"); |
||
| 26 | //Deletion des taches liés avant deletion de la UseCase |
||
| 27 | foreach($taches as $t){ |
||
| 28 | $t->delete(); |
||
| 29 | } |
||
| 30 | $object->delete(); |
||
| 31 | $this->response->redirect($_SERVER['HTTP_REFERER']."/2"); |
||
| 32 | } |
||
| 33 | } |
||
| 35 |
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.