Showing 379 of 6,675 total issues
Function handleSubmit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleSubmit(e) {
e.preventDefault();
var data = {systemName: this.systemNameInput.value,
registrarEmail: this.registrarEmailInput.value,
- Create a ticketCreate a ticket
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let icon = ''
switch (this.props.type) {
case 'danger':
icon = 'fa fa-exclamation-triangle'
- Create a ticketCreate a ticket
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var eData = null;
if(this.state.emgConData != null){
eData = this.state.emgConData.map(function (conData) {
return (
- Create a ticketCreate a ticket
Method execute
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
// Check permissions
if(!\Current_User::isDeity()){
\NQ::simple('intern', \Intern\UI\NotifyUI::ERROR, 'You do not have permission to delete internships.');
- Create a ticketCreate a ticket
Function updateFaculty
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateFaculty(faculty)
{
// Update the faculty details panel
var departmentName = $("#internship_department :selected").text();
- Create a ticketCreate a ticket
Method post
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post()
{
$subjectId = $_REQUEST['subjectId'];
$cnum = $_REQUEST['cnum'];
- Create a ticketCreate a ticket
Method _indexBy
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _indexBy($sql, $indexby, $colMode = false)
{
$rows = array();
if (!is_array($sql) || empty($sql)) {
- Create a ticketCreate a ticket
Method getTableColumns
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTableColumns($fullInfo = false)
{
static $table_check = null;
$table_compare = implode(':', $this->tables);
- Create a ticketCreate a ticket
Method getObjects
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getObjects($class_name)
{
$items = null;
$result = $this->select();
- Create a ticketCreate a ticket
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
render(){
var b = new Date().getTime();
var a = new Date(this.props.end_date * 1000);
var year = a.getFullYear();
var month = a.getMonth() + 1;
- Create a ticketCreate a ticket
Function constructor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props) {
super(props);
this.state = {
mainData: null,
- Create a ticketCreate a ticket
Method get
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get() {
$db = \phpws2\Database::newDB();
$pdo = $db->getPDO();
$arr = array();
- Create a ticketCreate a ticket
Method exec
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function exec($ch = null)
{
if ($ch === null) {
$this->rawResponse = curl_exec($this->curl);
- Create a ticketCreate a ticket
Method allowed
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function allowed($value)
{
if (!is_string($value)) {
return false;
}
- Create a ticketCreate a ticket
Function buildMessage
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function buildMessage()
{
$this->tpl['NAME'] = $this->internship->getFullName();
$this->tpl['BANNER'] = $this->internship->banner;
$this->tpl['TERM'] = $this->term->getDescription();
- 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 checkRequiredFields
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function checkRequiredFields(Internship $i){
if (!$i->isSecondaryPart()) {
// Check the course subject
$courseSubj = $i->getSubject();
if (!isset($courseSubj) || $courseSubj == '' || $courseSubj->id == 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 homogenize
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function homogenize(&$query)
{
$query_list = explode(',', $query);
$from[] = '/int\(\d+\)/iU';
- 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 addOrder
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function addOrder($order)
{
if (is_array($order)) {
foreach ($order as $value) {
$this->addOrder($value);
- 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 checkRequiredFields
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function checkRequiredFields(Internship $i)
{
if (!$i->isSecondaryPart()) {
// Check the course subject
$courseSubj = $i->getSubject();
- 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 checkRequiredFields
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function checkRequiredFields(Internship $i){
if (!$i->isSecondaryPart()) {
// Check the course subject
$courseSubj = $i->getSubject();
if (!isset($courseSubj) || $courseSubj == '' || $courseSubj->id == 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"