Showing 12 of 16 total issues
Plan
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Plan
{
const TABLE_NAME = 'proxybonanza_plan';
/**
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$timeStart = microtime(true);
$listShow = 'all';
Function execute
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$timeStart = microtime(true);
$listShow = 'all';
- 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 getRemotePlans
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getRemotePlans(ProxyBonanza $proxyBonanza, SymfonyStyle $symfonyStyle)
{
$symfonyStyle->section(' Getting remote data from ProxyBonanza ');
Method execute
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$timeStart = microtime(true);
/** @var ProxyBonanza $proxyBonanza */
Method getRemotePacks
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRemotePacks(\ArrayObject $pbPlans): \ArrayObject
{
if (!$pbPlans->count()) {
throw new \InvalidArgumentException('Can\'t get ip packs for empty plans');
}
Function testProxies
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function testProxies(
ProxyBonanza $proxyBonanza,
\ArrayObject $pbPlans,
SymfonyStyle $symfonyStyle
) {
- 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 getRemotePacks
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getRemotePacks(\ArrayObject $pbPlans): \ArrayObject
{
if (!$pbPlans->count()) {
throw new \InvalidArgumentException('Can\'t get ip packs for empty plans');
}
- 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 testProxies
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function testProxies(
ProxyBonanza $proxyBonanza,
\ArrayObject $pbPlans,
SymfonyStyle $symfonyStyle
) {
Function execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$timeStart = microtime(true);
/** @var ProxyBonanza $proxyBonanza */
- 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 insertProxies
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function insertProxies(\ArrayObject $pbPlans): bool
{
if (!$pbPlans->count()) {
return 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 insertAuthIps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function insertAuthIps(\ArrayObject $pbPlans): bool
{
if (!$pbPlans->count()) {
return 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"