Showing 379 of 6,675 total issues
Function getOrder
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getOrder($dbReady = false)
{
if (empty($this->order)) {
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 parseColumns
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function parseColumns($columns)
{
static $primary_keys = array();
//$table = $this->tables[0];
$table = $this->getSourceTable();
- 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 getRowTags
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getRowTags()
{
$tpl = array();
$tpl['NAME'] = \PHPWS_Text::moduleLink($this->getName(), 'intern',
array('action' => 'showAffiliateEditView', 'affiliation_agreement_id' => $this->getId()));
- 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 update
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function update($return_affected = false)
{
PHPWS_DB::touchDB();
$table = $this->getTable(true);
- 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 exec
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function exec($ch = null)
{
if ($ch === null) {
$this->rawResponse = curl_exec($this->curl);
- 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 showStudentWarnings
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function showStudentWarnings()
{
// Check if we have a student object. If we don't, then bail immediately.
if(!isset($this->student)){
return;
- 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 buildSwiftMessage
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected static function buildSwiftMessage($to, $fromAddress, $fromName, $subject, $content, $cc = NULL, $bcc = NULL){
// Sanity checking
if(!isset($to) || $to === null){
throw new \InvalidArgumentException('\"To\" not set.');
- 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 setSearch
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function setSearch()
{
$args = func_get_args();
if (sizeof($args) == 1 && is_array($args[0])) {
- 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 extractTableName
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function extractTableName($sql_value)
{
$temp = explode(' ', trim($sql_value));
if (!is_array($temp)) {
- 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 updateSequenceTable
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function updateSequenceTable()
{
$this->addColumn('id', 'max');
$max_id = $this->select('one');
- 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 buildSwiftMessage
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static function buildSwiftMessage($to, $fromAddress, $fromName, $subject, $content, $cc = NULL, $bcc = NULL){
- Create a ticketCreate a ticket
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Internship $internship, Student $student = null, WorkflowState $wfState, SubHost $host, Supervisor $supervisor, Term $term, $studentExistingCreditHours) {
- Create a ticketCreate a ticket
Method saveFile
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function saveFile($id, $name, $fileName, $target_file, $type,
$fileLongType)
- Create a ticketCreate a ticket
Function put
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function put() {
$postarray = json_decode(file_get_contents('php://input'));
$Id = $postarray->id;
$db = Database::newDB();
- 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 a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
render() {
var ApproveData = null;
if (this.state.approveData != null && this.state.hostData != null && this.state.conditionData != null) {
ApproveData = this.state.approveData.map(function (host) {
return (
- 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 handleSave
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
handleSave() {
this.setState({editMode: false});
var newStype = ReactDOM.findDOMNode(this.refs.savedStype).value.trim();
var newDescr = ReactDOM.findDOMNode(this.refs.savedDescr).value.trim();
- 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
Avoid deeply nested control flow statements. Open
if (!item.auto_renew && expiration < 0) {
filtered.push(item);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (item.host_approve_flag === 1) {
filtered.push(item);
}
- Create a ticketCreate a ticket
Method joinResult
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function joinResult($source_column, $join_table, $join_column, $content_column, $new_name=null, $searchable=false)
- Create a ticketCreate a ticket
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Internship $i, Student $student = null, SubHost $host, Supervisor $supervisor, Term $term, $studentExistingCreditHours)
- Create a ticketCreate a ticket