| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 9 |
| Ratio | 100 % |
| Tests | 3 |
| CRAP Score | 2.2559 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 1 | View Code Duplication | public function get($id) |
| 41 | { |
||
| 42 | 1 | if (!array_key_exists($id, $this->actions)) { |
|
| 43 | 1 | dump($this->actions); |
|
| 44 | throw new Exception('No Action with the service id "'.$id.'" has been found'); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $this->actions[$id]; |
||
| 48 | } |
||
| 49 | |||
| 71 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.