Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cognitive complexity calculation error #87

Open
Assignees
filipesperandio
@bkdotcom

Description

@bkdotcom

I apologize if this isn't the correct repo to report this

CodeClimate reports the Cognitive Complexity of the following function as 14
I believe the value should be 12

It seems that CodeClimate is incorrectly incrementing thecontinue statements

functiontestFunction($array){if (false) {return;    }$file ='';$line =0;if (false) {thrownew \RuntimeException('false was true!');    }foreach ($arrayas$key =>$val) {if (\is_int($key)) {continue;        }if (\is_string($val)) {continue;        }if (\is_array($val)) {foreach ($valas$val2) {// empty            }        }    }}

continue; should not increment

continue LABEL; should increment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp