Showing 379 of 6,675 total issues
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var dData = null;
if (this.state.dropData != null) {
// Maps the dropdown department data and calls the DepartmentList class
dData = this.state.dropData.map(function (dept) {
- Create a ticketCreate a ticket
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var states = null;
if (this.state.dropData != null) {
states = this.state.dropData.map(function (data) {
- Create a ticketCreate a ticket
Function viewShowFilter
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
viewShowFilter(data, filter) {
var filtered = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
- 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 getLinkValues
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getLinkValues()
{
$output = null;
if (isset($GLOBALS['DBPager_Link_Values'])) {
return $GLOBALS['DBPager_Link_Values'];
- 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 buildMessage
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function buildMessage()
{
$this->subject = 'Internship Enrollment Issue';
$this->to[] = $this->internship->email . $this->emailSettings->getEmailDomain();
- 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 execute
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
/* Check if user should have access to Affiliate Agreement page */
if(!\Current_User::allow('intern', 'affiliation_agreement')){
\NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, 'You do not have permission to add Affiliation Agreements.');
- Create a ticketCreate a ticket
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var data = null
var description = null
if (this.state.mainData != null) {
var onHidden = this.onHidden;
- Create a ticketCreate a ticket
Method execute
has 55 lines of code (exceeds 25 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();
- Create a ticketCreate a ticket
Method getLinkValues
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getLinkValues()
{
$output = null;
if (isset($GLOBALS['DBPager_Link_Values'])) {
return $GLOBALS['DBPager_Link_Values'];
- Create a ticketCreate a ticket
Method plugStudentValues
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function plugStudentValues(&$student, \stdClass $data){
/**********************
* Basic Demographics *
**********************/
$student->setStudentId($data->bannerID);
- Create a ticketCreate a ticket
Function execute
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
/* Check if user should have access to Affiliate Agreement page */
if(!\Current_User::allow('intern', 'affiliation_agreement')){
\NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, 'You do not have permission to add Affiliation Agreements.');
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
public function post($contractDir, $otherDir, $affiliationDir)
{
// List of known types taken from fileca$target_dir = $otherDir;binet. Only these accepted, update list of accept more.
$known_documents = array('csv', 'doc', 'docx', 'odt', 'pdf', 'ppt', 'pptx', 'rtf',
'tar', 'tgz', 'txt', 'xls', 'xlsx', 'xml', 'zip', 'gz', 'rar', 'ods', 'odp');
- 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 getCSV
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getCSV()
{
// Initalize term description list, if needed
// Store term list in a static var, so hopefully we only do this once per export
if(!isset(self::$termDescriptionList)){
- 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 addValue
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function addValue($column, $value = null)
{
if (is_array($column)) {
foreach ($column as $colKey => $colVal) {
$result = $this->addValue($colKey, $colVal);
- 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 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var fgClasses = classNames({'form-group': true, 'has-error': this.state.hasError});
var availHostOptions = null;
if (this.state.availableHost != null) {
- Create a ticketCreate a ticket
Function render
has 50 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 render
has 50 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 post
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post()
{
$user = $_REQUEST['user'];
$dept = $_REQUEST['dept'];
- Create a ticketCreate a ticket
Method road
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function road()
{
$roads = array(
'Elm',
'Cactus',
- Create a ticketCreate a ticket
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var data = null;
if (this.state.mainData != null) {
var onSave = this.onSave;
data = this.state.mainData.map(function (data) {
- Create a ticketCreate a ticket