| Conditions | 5 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5.583 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 4 | public function singoloPermesso($lettera) |
|
| 44 | { |
||
| 45 | 4 | $gestionepermessi = $this->container->get("ficorebundle.gestionepermessi"); |
|
| 46 | |||
| 47 | 4 | $parametri = array(); |
|
| 48 | 4 | $parametri['modulo'] = $this->getControllerName(); |
|
| 49 | switch ($lettera) { |
||
| 50 | 4 | case 'c': |
|
| 51 | return $gestionepermessi->creare($parametri); |
||
| 52 | break; |
||
| 53 | 4 | case 'r': |
|
| 54 | return $gestionepermessi->leggere($parametri); |
||
| 55 | break; |
||
| 56 | 4 | case 'u': |
|
| 57 | 4 | return $gestionepermessi->aggiornare($parametri); |
|
| 58 | break; |
||
| 59 | 4 | case 'd': |
|
| 60 | 4 | return $gestionepermessi->cancellare($parametri); |
|
| 61 | break; |
||
| 62 | default: |
||
| 63 | break; |
||
| 64 | } |
||
| 67 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.