| Conditions | 5 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function singoloPermesso($lettera) |
||
| 47 | { |
||
| 48 | $gestionepermessi = $this->container->get("ficorebundle.gestionepermessi"); |
||
| 49 | |||
| 50 | $parametri = array(); |
||
| 51 | $parametri['modulo'] = $this->getControllerName(); |
||
| 52 | switch ($lettera) { |
||
| 53 | case 'c': |
||
| 54 | return $gestionepermessi->creare($parametri); |
||
| 55 | break; |
||
| 56 | case 'r': |
||
| 57 | return $gestionepermessi->leggere($parametri); |
||
| 58 | break; |
||
| 59 | case 'u': |
||
| 60 | return $gestionepermessi->aggiornare($parametri); |
||
| 61 | break; |
||
| 62 | case 'd': |
||
| 63 | return $gestionepermessi->cancellare($parametri); |
||
| 64 | break; |
||
| 65 | default: |
||
| 66 | break; |
||
| 67 | } |
||
| 70 |
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.