Exemple #1
0
 protected function nesting($first, $second, $third, $fourth)
 {
     if ($first) {
         if ($second) {
             if ($third) {
                 if ($fourth) {
                     doSomethink();
                 }
             }
         }
     }
 }
Exemple #2
0
 protected function multilineCondition($first, $second, $third)
 {
     if ($first > 7 && $second < 9 || $third) {
         doSomethink();
     }
 }
Exemple #3
0
 protected function cyclomaticComplexity($first)
 {
     switch ($first) {
         case 1:
             doSomethink();
             break;
         default:
             doSomethink();
     }
     if ($first) {
         doSomethink();
     } else {
         if ($first) {
             doSomethink();
         }
     }
     while ($first) {
         for (; $first; $first) {
             doSomethink();
         }
     }
     do {
         for (; true; $first) {
             doSomethink();
         }
     } while ($first);
     if ($first) {
         do {
             doSomethink();
         } while ($first);
     }
 }
Exemple #4
0
class Bad
{
    private $a = doSomethink($spacedParenthesis);
}