Showing 379 of 6,675 total issues
Function select
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function select($type = null, $sql = null)
{
if (empty($sql)) {
if (!empty($this->sql)) {
$sql = & $this->sql;
- Read upRead up
- Create a ticketCreate a ticket
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 moveRow
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function moveRow($order_column, $id_column, $id, $direction = 1)
{
if (!($direction == 1 || $direction == -1)) {
if (strtolower($direction) == 'down') {
$direction = 1;
- Read upRead up
- Create a ticketCreate a ticket
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 pullTables
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public static function pullTables($sql)
{
$sql = preg_replace('/ {2,}/', ' ', trim($sql));
$sql = preg_replace('/[\n\r]/', ' ', $sql);
$command = substr($sql, 0, strpos($sql, ' '));
- Read upRead up
- Create a ticketCreate a ticket
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
Faculty
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Faculty extends Model implements DbStorable {
public $id;
private $username;
- Create a ticketCreate a ticket
Function render
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var conData = null;
if (this.props.conditionData != null) {
conData = this.props.conditionData.map(function (condition) {
return (
- Create a ticketCreate a ticket
Function _getJoinOn
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function _getJoinOn($join_on_1, $join_on_2, $table1, $table2, $ignore_tables = false)
{
if (empty($join_on_1) || empty($join_on_2)) {
return null;
}
- Read upRead up
- Create a ticketCreate a ticket
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 saveObject
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function saveObject($object, $stripChar = false, $autodetect_id = true)
{
if (!is_object($object)) {
return PHPWS_Error::get(PHPWS_WRONG_TYPE, 'core', 'PHPWS_DB::saveObject', _('Type') . ': ' . gettype($object));
}
- Read upRead up
- Create a ticketCreate a ticket
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 editAdmin.jsx
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import {CSSTransition} from 'react-transition-group'
- Create a ticketCreate a ticket
File EmgContactList.jsx
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import {Button, Modal} from 'react-bootstrap';
import Message from './Message.jsx';
- Create a ticketCreate a ticket
File ContractAffiliation.jsx
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import ReactDOM from 'react-dom';
import Dropzone from 'react-dropzone';
import $ from 'jquery';
import classNames from 'classnames';
- Create a ticketCreate a ticket
File InternshipInventory.php
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
* Internship Inventory is free software: you can redistribute it and/or modify
- Create a ticketCreate a ticket
Function exports
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (env, argv) => {
const inProduction = argv.mode === 'production'
const inDevelopment = argv.mode === 'development'
const settings = {
- Create a ticketCreate a ticket
Function validate
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
validate(form, thisComponent) {
// Assume everything is valid, change this if we detect otherwise
var valid = true;
var errors = [];
- Read upRead up
- Create a ticketCreate a ticket
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 render
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
render()
{
var data = null;
var inData = null;
if (this.state.mainData != null) {
- Create a ticketCreate a ticket
File SaveInternship.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
- Create a ticketCreate a ticket
Method plugStudent
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function plugStudent() {
// Student
$this->tpl['BANNER'] = $this->intern->getBannerId();
$this->tpl['STUDENT_FIRST_NAME'] = $this->intern->getFirstName();
$this->tpl['STUDENT_MIDDLE_NAME'] = $this->intern->middle_name;
- Create a ticketCreate a ticket
Method moveRow
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function moveRow($order_column, $id_column, $id, $direction = 1)
{
if (!($direction == 1 || $direction == -1)) {
if (strtolower($direction) == 'down') {
$direction = 1;
- Create a ticketCreate a ticket
Function get
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function get() {
$db = \phpws2\Database::newDB();
$pdo = $db->getPDO();
$arr = array();
- Read upRead up
- Create a ticketCreate a ticket
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 buildMessage
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildMessage()
{
$subjects = Subject::getSubjects();
$faculty = $this->internship->getFaculty();
- Create a ticketCreate a ticket
Method display
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function display()
{
\javascript('jquery');
\javascript('jquery_ui');
- Create a ticketCreate a ticket