src/themes/OceanTheme.php
Method ApplyPlot
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method SetupGraph
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Function ApplyPlot
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
- 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 name "OceanTheme::ApplyPlot" is not in camel caps format Open
Open
public function ApplyPlot($plot)
- Exclude checks
Method name "OceanTheme::GetColorList" is not in camel caps format Open
Open
public function GetColorList()
- Exclude checks
Method name "OceanTheme::SetupPieGraph" is not in camel caps format Open
Open
public function SetupPieGraph($graph)
- Exclude checks
Method name "OceanTheme::PreStrokeApply" is not in camel caps format Open
Open
public function PreStrokeApply($graph)
- Exclude checks
Method name "OceanTheme::SetupGraph" is not in camel caps format Open
Open
public function SetupGraph($graph)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->ApplyPlot($_plot);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->ApplyPlot($_plot);
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
Open
foreach ($plot->plots as $_plot) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
Open
foreach ($plot->plots as $_plot) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
Open
}
- Exclude checks