Showing 379 of 6,675 total issues
Method getStudent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getStudent($studentId){
if($studentId === null || $studentId == ''){
throw new \InvalidArgumentException('Missing student ID.');
}
- Create a ticketCreate a ticket
Method homogenize
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function homogenize(&$query)
{
$query_list = explode(',', $query);
$from[] = '/int\(\d+\)/iU';
- Create a ticketCreate a ticket
Function searchListByDept
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
searchListByDept(e) {
var dept = null;
try {
// Saves the dept that the user is looking for.
- Create a ticketCreate a ticket
Function viewShowFilter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
viewShowFilter(data, filter) {
var filtered = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
- Create a ticketCreate a ticket
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="panel panel-default">
<div className="panel-body">
<div className="row">
- Create a ticketCreate a ticket
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="col-md-5 col-md-offset-1">
<br /><br /><br />
<div className="panel panel-default">
- Create a ticketCreate a ticket
Method get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get()
{
$id = $_REQUEST['id'];
$type = $_REQUEST['type'];
// If the document's id is set then we're downloading the file
- Create a ticketCreate a ticket
Method getTotalRows
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTotalRows()
{
/**
* if total_column is set, use it to get total rows
*/
- Create a ticketCreate a ticket
Method getMessage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getMessage($id) {
if(is_null($id) || !isset($id)) {
throw new \InvalidArgumentException('Host ID is required.');
}
- Create a ticketCreate a ticket
Method buildMessage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildMessage()
{
$this->to = explode(',', $this->emailSettings->getExceptionEmail());
$this->subject = 'Uncaught Exception';
- Create a ticketCreate a ticket
Method addColumn
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addColumn($column, $max_min = null, $as = null, $count = false, $distinct = false, $coalesce = null)
{
/****
* What is this for?
- Create a ticketCreate a ticket
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Student $student, $term, $location, $state, $country, Department $department, SubHost $sub_host, Supervisor $supervisor){
- Create a ticketCreate a ticket
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(string $term, string $description, int $availableOnTimestamp, int $censusDateTimestamp, int $startTimestamp, int $endTimestamp, int $undergradOverloadHours, int $gradOverloadHours)
- Create a ticketCreate a ticket
Function contractAffilationSelected
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function contractAffilationSelected($id)
{
/* Check if user should have access to folders since this method does not go through execute */
if (!\Current_User::isLogged()) {
\NQ::simple('intern', \Intern\UI\NotifyUI::WARNING,
- 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 plug
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function plug()
{
$tpl = array();
$tpl['HOME_LINK'] = \PHPWS_Text::moduleLink('Menu', 'intern');
$tpl['ADD_LINK'] = \PHPWS_Text::moduleLink('Add Student', 'intern', array('action' => 'ShowInternship'));
- 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 execute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
// Check permissions
if(!\Current_User::allow('intern', 'create_internship')){
\NQ::simple('intern', \Intern\UI\NotifyUI::ERROR, 'You do not have permission to create new internships.');
\NQ::close();
- 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 post
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function post() {
$code = $_REQUEST['code'];
$census = $_REQUEST['census'];
$descr = $_REQUEST['descr'];
$available = $_REQUEST['available'];
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
handleSave() {
if (this.refs.sub_address.value === ''||this.refs.sub_zip.value === ''||this.state.location === undefined) {
this.setState({showError: true, warningMsg: "Please enter sub host address information."});
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 addTable
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function addTable($table, $as = null)
{
if (is_array($table)) {
foreach ($table as $tbl_name) {
$this->addTable($tbl_name);
- 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 parsePearCol
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function parsePearCol($info, $strip_name = false)
{
$setting = $GLOBALS['PHPWS_DB']['lib']->export($info);
if (isset($info['flags'])) {
if (stristr($info['flags'], 'multiple_key')) {
- 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"