Function getTopImage
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
private function getTopImage($item)
{
// Manual Signs Page && smartType override checked takes precedence
if (isset($item['smartType']) && $item['smartType'] == 'CoopDeals') {
return __DIR__ . '/noauto/images/codeals_top_2.png';
- 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 getBottomImage
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private function getBottomImage($item)
{
// Manual Signs Page && smartType override checked takes precedence
if (isset($item['smartType']) && $item['smartType'] == 'CoopDeals') {
return __DIR__ . '/cd_line_16.png';
- 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 drawPDF
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drawPDF()
{
$pdf = $this->createPDF();
$dbc = FannieDB::get(FannieConfig::config('OP_DB'));
$basicP = $dbc->prepare("SELECT
Function drawPDF
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function drawPDF()
{
$pdf = $this->createPDF();
$dbc = FannieDB::get(FannieConfig::config('OP_DB'));
$basicP = $dbc->prepare("SELECT
- 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 getTopImage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getTopImage($item)
{
// Manual Signs Page && smartType override checked takes precedence
if (isset($item['smartType']) && $item['smartType'] == 'CoopDeals') {
return __DIR__ . '/noauto/images/codeals_top_2.png';
Method getBottomImage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getBottomImage($item)
{
// Manual Signs Page && smartType override checked takes precedence
if (isset($item['smartType']) && $item['smartType'] == 'CoopDeals') {
return __DIR__ . '/cd_line_16.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/chaching_bottom_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/standard_bottom_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/chaching_top_2.png';
Avoid too many return
statements within this method. Open
return 'EXTRAS';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/local-top.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/organic_top_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/freshdeals_top_2.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/standard_top_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/codeals_top_2.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/organic_top_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/freshdeals_bottom_2.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/local_og_bottom.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/organic_bottom_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/organic_bottom_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/basics_bottom_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/local-top.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/cd_line_16.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/basics_top_12.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/local_og_top.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/local_og_top.png';
Avoid too many return
statements within this method. Open
return __DIR__ . '/noauto/images/local-bottom.png';