Showing 9 of 9 total issues
Function getNodes
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function getNodes(DOMNodeList $nodeList, string $password = null): array
{
$xpath = $this->xmlParser->getXpath();
$clients = NodeAdapter::arrayAdapter(
- 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
Method getNodes
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getNodes(DOMNodeList $nodeList, string $password = null): array
{
$xpath = $this->xmlParser->getXpath();
$clients = NodeAdapter::arrayAdapter(
Method execute
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
try {
$password = $input->getOption('password');
Function execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
try {
$password = $input->getOption('password');
- 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
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(CLImate $climate, LoggerInterface $logger, SymfonyStyle $io)
{
parent::__construct();
$this->climate = $climate;
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(CLImate $climate,
LoggerInterface $logger,
SymfonyStyle $io,
XmlParser $xmlParser,
XmlReader $xmlReader,
Function normalizeVersionForCompare
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function normalizeVersionForCompare($versionIn): string
{
if (!empty($versionIn)) {
if (is_string($versionIn)) {
list($version, $build) = explode('.', $versionIn);
- 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 checkVersion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function checkVersion($first, $second)
{
$first = self::normalizeVersionForCompare($first);
$second = self::normalizeVersionForCompare($second);
- 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 decrypt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function decrypt($data, $securedKey, $password = null)
{
try {
if ($securedKey instanceof Key) {
return Crypto::decrypt($data, $securedKey);
- 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"