Showing 251 of 1,173 total issues
Method generateSearchCriteria
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateSearchCriteria(array $listHeaders, $query = null, $requestMethod = 'GET')
{
if ($query === null) {
$config = Registry::getConfigClass();
$queryKey = $config->get('list')['query'];
Method pushMonologHandler
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function pushMonologHandler(Logger $logger, $handlerKey, $handlerConfig = [])
{
$activeHandlers = [];
switch ($handlerKey) {
Function slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
Method testIsAllRequired
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testIsAllRequired()
{
$app = App::getInstance();
$app->init('dev');
Function add
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function add(array $inputs, array $fieldsValues = [], $extraDefinedInputs = [])
{
/**
* Start validating common inputs.
*/
- 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 validateWhitelist
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function validateWhitelist(array $args)
{
$output = new Output();
if (!isset($args['whitelist']) || !is_array($args['whitelist'])) {
- 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 getDefinedInputs
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getDefinedInputs($action = null, array $includingInputs = [], array $excludingInputs = [])
{
if ($action === 'batchUpdate') {
$idRule = new ValidatorRule('id');
$definedInputs['id'] = new DatabaseInput('id', [$idRule]);
Method update
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update(
array $criteria,
array $inputs,
array $fieldsValues,
$limit = 0,
Method testStringLastReplace
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testStringLastReplace()
{
$utility = new StringUtility();
$inputOutputs = [
Method forgetPassword
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function forgetPassword(User $user)
{
$output = new Output();
if ($this->isUserActive($user) !== true) {
Method testGetFilteredInputs
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testGetFilteredInputs()
{
$dummyInput1 = new Input('name');
$dummyInput2 = new Input('email');
Method testRemovePrefix
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testRemovePrefix()
{
$utility = new StringUtility();
$inputOutputs = [
Method add
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function add(array $inputs, array $fieldsValues = [], $extraDefinedInputs = [])
{
/**
* Start validating.
*/
Method testMapRowsToObjects
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testMapRowsToObjects()
{
$app = App::getInstance();
$app->init();
Method regexMatch
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function regexMatch($pattern, $path)
{
if (empty($pattern) || empty($path)) {
return false;
}
Function viewChild
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function viewChild()
{
$urlParameters = $this->getURLParameters();
if (empty($urlParameters['id'])) {
- 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 getStatesCitiesGroupedByStates
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getStatesCitiesGroupedByStates(
array $criteria = [],
$order = null,
$start = 0,
$limit = 0,
- 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 get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function get($key, $component = null, $checkInEnvironment = true)
{
if ($component !== null) {
$rootNamespace = $this->get('ROOT_NAMESPACE');
- 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 bindValues
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function bindValues(\PDOStatement $statement, array $criteria, $start = 0, $limit = 0, array $fieldsValues = [])
{
// bind criteria values
$this->bindCriteria($statement, $criteria);
- 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 pushMonologHandler
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function pushMonologHandler(Logger $logger, $handlerKey, $handlerConfig = [])
{
$activeHandlers = [];
switch ($handlerKey) {
- 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"