-
Notifications
You must be signed in to change notification settings - Fork 4
Open
@bkdotcom
Description
I don't know what this method's cognitive-complexity should be, but I know it shouldn't be 11
public function foo() { $blah = array(); for ($i = 0, $count = \count($this->things); $i < $count; $i++) { switch ($this->things[$i]['method']) { case 'foo': case 'bar': $blah[] = $i; break; case 'baz': \array_pop($blah); break; case 'ding': case 'dong': if ($this->something === false) { break; } foreach ($blah as $i2) { $this->things[$i2]['method'] = 'foo'; } break; } } }
9 maybe?
̄\_(ツ)_/ ̄