Showing 379 of 6,675 total issues
Method put
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function put() {
$postarray = json_decode(file_get_contents('php://input'));
$Id = $postarray->id;
$Name = $postarray->name;
- Create a ticketCreate a ticket
Method doTransition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doTransition($note = null)
{
// Make sure the transition makes sense based on the current state of the internship
$currStateName = $this->internship->getStateName();
- Create a ticketCreate a ticket
Method buildMessage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildMessage()
{
$this->to = explode(',', $this->emailSettings->getBackgroundCheckEmail());
$host = $this->internship->getHost();
- Create a ticketCreate a ticket
Method plugValues
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function plugValues(&$student, Array $data)
{
/**********************
* Basic Demographics *
**********************/
- Create a ticketCreate a ticket
Function onTermCreate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
onTermCreate(tcode, stype, descr, census, available, start, end, ugradOver, gradOver) {
var errorMessage = null;
if (tcode === '' || tcode.length !== 6) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function post()
{
// Check permissions
if(!\Current_User::isLogged()){
header('HTTP/1.1 403 Forbidden');
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
protected function buildMessage()
{
$faculty = $this->internship->getFaculty();
$host = $this->internship->getHost();
- 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 getTheQuery
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getTheQuery($type){
$sql_array = $this->getSelectSQL($type);
if (PHPWS_Error::isError($sql_array)) {
throw new Exception($sql_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
Function getTransitionsFromState
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function getTransitionsFromState(WorkflowState $state, Internship $i)
{
$stateName = $state->getName();
// Strip namespace from state name by matching the last word character in the path
- 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 addRowFunction
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function addRowFunction($function)
{
if (is_string($function) && function_exists($function)) {
$this->run_function = $function;
return 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 plugValues
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function plugValues(&$student, Array $data)
{
/**********************
* Basic Demographics *
**********************/
- 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 _expandIndex
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function _expandIndex(&$rows, $index, $item, &$stacked)
{
if ($this->force_array) {
$rows[$index][] = $item;
} elseif (isset($rows[$index]) && !$this->ignore_dups) {
- 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 addTableColumn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function addTableColumn($column, $parameter, $after = null, $indexed = false)
{
$table = $this->getTable(false);
if (!$table) {
return PHPWS_Error::get(PHPWS_DB_ERROR_TABLE, 'core', 'PHPWS_DB::addTableColumn');
- 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 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var name = null;
var hButton = null;
// Determines which element to show on the page (hide/show and Save/Edit)
if (this.props.hidden === 0) {
- Create a ticketCreate a ticket
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
// Warning notification for invalid Banner size or Banner ID
var notification = <div className="alert alert-warning" role="alert">{this.state.errorWarning !== '' ? this.state.errorWarning: this.props.errorWarning}</div>
// Search bar for inputting the Banner ID
- Create a ticketCreate a ticket
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var options = this.props.locations;
var selectOptions = options.map(function(location){
- Create a ticketCreate a ticket
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var options = this.props.departments;
var selectOptions = options.map(function(department){
- Create a ticketCreate a ticket
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var textDes = null;
var textLev = null;
var eButton = null;
var textName = <span className="text-muted"> {this.props.code} </span>;
- Create a ticketCreate a ticket
Method checkForMissingInput
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkForMissingInput() {
// Check for missing data
$missingFieldList = array();
// Check student ID
- Create a ticketCreate a ticket
Method buildSwiftMessage
has 27 lines of code (exceeds 25 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.');
- Create a ticketCreate a ticket