Showing 379 of 6,675 total issues
Method process
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function process($arguments)
{
$dump_data = false;
array_shift($arguments);
- Create a ticketCreate a ticket
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var dropdown;
if(!this.state.domestic && !this.state.international) {
dropdown = '';
- Create a ticketCreate a ticket
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
// If we have no data, and it's still loading, then return an empty div
if(this.state.terms === null && this.state.dataLoading === true){
return (<div></div>);
- Create a ticketCreate a ticket
Method execute
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
// Get the list of future terms
$terms = TermFactory::getFutureTermsAssoc();
- Create a ticketCreate a ticket
Function viewShowFilter
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
viewShowFilter(data, filter) {
var filtered = [];
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (filter === 'condition') {
- 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 processArgs
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function processArgs($argc, $argv, &$args, &$switches)
{
if($argc < count(array_keys($args)) + 1) {
echo "USAGE: php {$argv[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 getTableColumns
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getTableColumns($fullInfo = false)
{
static $table_check = null;
$table_compare = implode(':', $this->tables);
- 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 generatePdf
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function generatePdf()
{
$this->pdf = new \setasign\Fpdi\Fpdi('P', 'mm', 'Letter');
$h = $this->internship->getHost();
$s = $this->internship->getSupervisor();
- 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 check_args
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function check_args($argc, $argv, &$args, &$switches)
{
if($argc < count(array_keys($args)) + 1) {
echo "USAGE: php {$argv[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
Method post
has 47 lines of code (exceeds 25 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');
- Create a ticketCreate a ticket
Method createReport
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createReport()
{
if ($this->class) {
$methods = get_class_methods($this->class);
if (in_array($this->report_row, $methods)) {
- Create a ticketCreate a ticket
Function sortBy
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
sortBy(unsorted, typeOfSort) {
var sorted = [];
// Different logic for different types of sorts,
// all utilizing sort function.
- Create a ticketCreate a ticket
Method getJoin
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getJoin()
{
if (empty($this->_join_tables)) {
return null;
}
- Create a ticketCreate a ticket
Function onAdminCreate
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
onAdminCreate(username, department)
{
//var displayName = '';
var displayData = this.state.displayData;
var dept = this.state.deptData;
- Create a ticketCreate a ticket
Method getColumn
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getColumn($format = false)
{
if ($format) {
if (empty($this->columns)) {
//return $this->tables[0] . '.*';
- Create a ticketCreate a ticket
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
var majorsDropdown;
if(!this.state.undergrad && !this.state.graduate) {
majorsDropdown = <MajorsDropDown formStyle='horizontal'/>;
- Create a ticketCreate a ticket
Method display
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function display()
{
/* 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 Affiliate Agreements.');
- Create a ticketCreate a ticket
Function get
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function get() {
$db = \phpws2\Database::newDB();
$pdo = $db->getPDO();
if(!isset($_REQUEST['Waiting']) && !isset($_REQUEST['Condition'])){
- 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 createTableIndex
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function createTableIndex($column, $name = null, $unique = false)
{
if (!DB_ALLOW_TABLE_INDEX) {
return false;
}
- 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 getObjects
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function getObjects($class_name)
{
$items = null;
$result = $this->select();
- 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"