Showing 332 of 2,142 total issues
Function createMultiple
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function createMultiple($number, $length = 10, $type = 'pronounceable', $chars = '')
{
$passwords = [];
while ($number > 0) {
- 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 getInstances
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getInstances($exclude_blank = false)
{
$result = query(self::SQL_SELECT_INSTANCE);
$instances = [];
- 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 createTempPartial
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function createTempPartial($root, $files)
{
$fileSystem = new Filesystem();
$temp = implode(
\DIRECTORY_SEPARATOR,
- 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 getApplications
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getApplications(Instance $instance)
{
$objects = [];
$dir = __DIR__;
- 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 extractTo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function extractTo(Version $version, $folder): void
{
$dirExists = file_exists($folder);
if ($dirExists && preg_match('/tags\\//', $version->branch)) {
- 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 decompressArchive
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function decompressArchive($folder, $archive)
{
$access = $this->access;
$bzipStep = false;
- 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 install
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function install(Version $version, $checksumCheck = false)
{
$access = $this->instance->getBestAccess('scripting');
$host = $access->getHost();
- 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 createMultipleFromLogin
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function createMultipleFromLogin($login, $type, $key = 0)
{
$passwords = [];
$number = count($login);
$save = $number;
- 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 query
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function query($query, $params = null)
{
if (is_null($params)) {
$params = [];
}
- 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 $answer;
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return 0;
Avoid too many return
statements within this method. Open
return $instance->getId() == $input->getOption('target');
Avoid too many return
statements within this method. Open
return 1;
Avoid too many return
statements within this method. Open
return $instance;
Avoid too many return
statements within this method. Open
return implode(',', $emails);
Avoid too many return
statements within this method. Open
return $this->handleNotEmptyWebrootFolder($value);
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return 1;