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