Showing 251 of 1,173 total issues
File bootstrap.js
has 1587 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
File ValidatorTest.php
has 929 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\tests;
use CodeJetter\core\App;
Method testSelectQuery
has 336 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectQuery()
{
$queryMaker = new \CodeJetter\core\database\QueryMaker('testTable');
$criteria = [
Function validate
has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring. Open
public function validate()
{
$output = new Output();
if ($this->isAlreadyValidated()) {
// return the current output is already validated
- 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 where
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
private function where(array $criteria)
{
if (!empty($criteria)) {
$where = ' WHERE ';
- 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
File StringUtilityTest.php
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\tests;
use CodeJetter\core\utility\StringUtility;
File QueryMakerTest.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class QueryMakerTest extends \PHPUnit_Framework_TestCase
{
public function testSelectQuery()
File Validator.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\core\security;
use CodeJetter\core\FormHandler;
Method testValidatePassword
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testValidatePassword()
{
$app = App::getInstance();
$app->init('dev');
File BaseMapper.php
has 450 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\core;
use CodeJetter\core\database\QueryMaker;
File MemberUserController.php
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\components\user\controllers;
use CodeJetter\components\page\models\Page;
File AdminUserController.php
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\components\user\controllers;
use CodeJetter\components\page\models\Page;
Method testRegexMatch
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testRegexMatch()
{
$app = App::getInstance();
$app->init('dev');
Validator
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class Validator
{
/**
* @var array
*/
Method testGetAccessRole
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testGetAccessRole()
{
$app = App::getInstance();
$app->init('dev');
File QueryMaker.php
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace CodeJetter\core\database;
use CodeJetter\core\utility\MysqlUtility;
Method testGenerateDropDownList
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testGenerateDropDownList()
{
$utility = new HtmlUtility();
$ios = [
Function getFieldsValues
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function getFieldsValues(array $inputs, array $definedInputs, $case, array $columnsWhitelist = [])
{
$fieldsValues = [];
if (!empty($definedInputs)) {
foreach ($definedInputs as $definedInput) {
- 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
BaseMapper
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class BaseMapper extends Base implements ICrud
{
protected $database;
protected $table;
protected $modelName;
Function update
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function update(
array $criteria,
array $inputs,
array $fieldsValues,
$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"