Showing 94 of 104 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id, array $classes, array $data, array $rows, FilterInterface $filter)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id, array $classes, array $data, WritableBearerInterface $writableBearer, $type)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(array $classes, array $data, $type, $label, $target)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$id,
array $classes,
array $data,
$value,
$alias
Function applyToRows
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function applyToRows(array $rows)
{
$fieldName = $this->getFieldName();
$condition = $this->getCondition();
$criterion = $this->getCriterion();
- 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 getSubmitted
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getSubmitted()
{
$fieldType = $this->getType();
$data = array_key_exists($this->getSlug(), $_POST) === true ? $_POST[$this->getSlug()]: "";
- 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 search
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
athens.search = (function () {
var searchDiv = $(".search-div");
/**
- 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 parseChoiceSlugs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parseChoiceSlugs($slugs)
{
if ($this->getType() === static::TYPE_CHOICE || (bool)($slugs) === false) {
$slugs = [$slugs];
}
- 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 validateRenderer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function validateRenderer()
{
if ($this->renderer === null) {
$settingsInstance = $this->getSettingsInstance();
- 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 toTitleCase
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function toTitleCase($string)
{
// Replace underscores, dashes with spaces
$string = str_replace(["_", "-"], " ", $string);
- 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 visitFilter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function visitFilter(FilterInterface $filter)
{
if ($filter instanceof DummyFilter) {
$type = 'dummy';
} elseif ($filter instanceof SelectFilter) {
- 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 $this->environment;
Avoid too many return
statements within this method. Open
return new ExcludingFilterStatement($option[0], $option[1], $option[2], null);
Avoid too many return
statements within this method. Open
return $val === $criterion;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return $string;
Avoid too many return
statements within this method. Open
return array_filter($rows, $filter);
Avoid too many return
statements within this method. Open
return $string;
Avoid too many return
statements within this method. Open
return new RelationFilter(
$this->id,
$this->classes,
$this->data,
$query,
Avoid too many return
statements within this method. Open
return $rows;