Showing 30 of 66 total issues
Function hide
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
var startEvent = $.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
Function refresh
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
ScrollSpy.prototype.refresh = function () {
var that = this
var offsetMethod = 'offset'
var offsetBase = 0
Function applyTo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function applyTo(array &$data, array $objects)
{
foreach ($data as $row_index => $row)
{
$identifier_raw = $data[$row_index][$this->_identifier_index];
- 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 _addSearch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function _addSearch(\Doctrine\ORM\QueryBuilder $queryBuilder)
{
if ($this->search == TRUE)
{
$request = $this->request;
- 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 function. Open
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
Avoid too many return
statements within this method. Open
return $property->getValue($object);
Avoid too many return
statements within this method. Open
return $__getValue(substr($prop, strpos($prop, '.') + 1), $property->getValue($object));
Avoid too many return
statements within this method. Open
return array($data, $objects);
Avoid too many return
statements within this function. Open
return false
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$request = $this->_request;
$iTotalRecords = $this->_queryBuilder->getTotalRecords();
list($data, $objects) = $this->_queryBuilder->getData();
- 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"