Skip to content

Commit

Permalink
chore: Make the pipeline fail
Browse files Browse the repository at this point in the history
  • Loading branch information
hectoras committed Dec 21, 2023
1 parent b3bdd76 commit 96c1d8a
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions controller/HighCC.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php

namespace oat\taoMediaManager\controller;

// Cyclomatic Complexity = 11
class HighCC
{
public function example()
{
$a = $b = $c = $d = 2;
$a1 = $a2 = $b1 = $b2 = $c = $d = 1;
$e = $f = $h = $z = 1;

if ($a == $b) {
if ($a1 == $b1) {
fiddle();
} elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
if ($a == $b) {
if ($a1 == $b1) {
fiddle();
} elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
} elseif ($c == $d) {
while ($c == $d) {
fiddle();
}
} elseif ($e == $f) {
for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
case 1:
fiddle();
break;
case 2:
fiddle();
break;
case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
} elseif ($c == $d) {
while ($c == $d) {
fiddle();
}
} elseif ($e == $f) {
for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
case 1:
fiddle();
break;
case 2:
fiddle();
break;
case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}

0 comments on commit 96c1d8a

Please sign in to comment.