Showing 94 of 104 total issues
Method __construct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
$id,
array $classes,
array $data,
QueryWrapperInterface $query,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
$id,
$type,
array $classes,
array $data,
$title,
Function build
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function build()
{
$this->validateId();
$type = $this->retrieveOrException("type", __METHOD__);
- 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 validateOnInvalidFunc
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function validateOnInvalidFunc()
{
$this->onInvalidFunctions[] = function (FormInterface $thisForm) {
foreach ($thisForm->getWritableBearer()->getWritables() as $writable) {
if ($writable instanceof FieldInterface) {
- 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 alert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
athens.alert = (function () {
/**
* Creates an alert div, appends it to the notification area, and schedules it for removal.
*
- 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 sort
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
athens.sort = (function () {
var setupSortFilter = function (handle) {
var filterSection = $("div.sort-container[data-handle-for=" + handle + "]").closest('.table-container');
Function done
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var done = function (data, textStatus, jqXHR) {
try {
var formPOSTResult = $("<div>" + data + "</div>").find("#" + formId);
var formHasErrors = formPOSTResult.hasClass("has-errors");
Function buildTopMatter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function buildTopMatter()
{
$topMatterBuilder = SectionBuilder::begin()
->setType(SectionBuilder::TYPE_SPAN);
- 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 queryFilter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function queryFilter(QueryWrapperInterface $query)
{
$this->canQueryFilter = true;
if ($this->getNextFilter()->canQueryFilter === false) {
$this->canQueryFilter = 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 queryFilter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function queryFilter(QueryWrapperInterface $query)
{
$this->canQueryFilter = true;
if ($this->getNextFilter()->canQueryFilter === false) {
$this->canQueryFilter = 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 multi_adder
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
athens.multi_adder = (function () {
var getLastRow = function (multiAdderTable) {
return multiAdderTable.find("tr.form-row").last();
};
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
array $classes,
array $data,
WritableBearerInterface $writableBearer,
array $labels,
$onClick,
Function validateOnValidFunc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function validateOnValidFunc()
{
if ($this->onSuccessUrl !== null) {
$url = $this->onSuccessUrl;
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$id,
array $classes,
array $data,
QueryWrapperInterface $query,
$default,
Function call
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
var call = function (url, type, settings, data, done, fail) {
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$id,
array $classes,
array $data,
array $statements,
$default,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
array $classes,
array $data,
$type,
$link = "",
$text = ""
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id, array $classes, $maxPerPage, $page, FilterInterface $nextFilter = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id, array $classes, array $data, $type, $contents)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($id, array $classes, array $data, array $statements, FilterInterface $nextFilter = null)