Showing 306 of 306 total issues
Function add
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function add(&$attributes, $actions)
{
$index = 0;
$childs = [];
foreach ($actions as $name => $callback) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parsePackage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parsePackage($attribute, UploadedFile $value, $parameters)
{
$name = $value->getClientOriginalName();
$this->directory = $directory = $value->directory;
$this->filename = $filename = $value->filename;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function run($path)
{
$this->createMigrationRepository();
$repository = $this->migrator->getRepository();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return [$str, $array, $serializable, $stringify, $jsonable];
Avoid too many return
statements within this method. Open
return $classname;
Avoid too many return
statements within this method. Open
return 'Number.POSITIVE_INFINITY';
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return $meta->value;
Avoid too many return
statements within this method. Open
return Gravatar::src($email, $width);
Avoid too many return
statements within this method. Open
return self::decorate(get_object_vars($value), $safe);
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return '[' . implode(',', $es) . ']';
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return new Twig_SimpleFunction(
'component_attributes', $function
);
Avoid too many return
statements within this method. Open
return "$value";
Avoid too many return
statements within this method. Open
return $value->__toString();
Avoid too many return
statements within this method. Open
return Gravatar::src($email, $width);
Avoid too many return
statements within this method. Open
return [
$avatar, $avatarWidget, $gravatar, $profilePicture
];
Avoid too many return
statements within this method. Open
return '';
Avoid too many return
statements within this method. Open
return $return;