Showing 6,675 of 6,675 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
constructor(props){
super(props);
this.handleSearch = this.handleSearch.bind(this);
this.onKeyPress = this.onKeyPress.bind(this);
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 62.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
* Internship Inventory is free software: you can redistribute it and/or modify
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
* Internship Inventory is free software: you can redistribute it and/or modify
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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() {
var eData = null;
if(this.state.emgConData != null){
eData = this.state.emgConData.map(function (conData) {
return (
- 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
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
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
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 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
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (this.props.msgType === 'success') {
notification = <div className="alert alert-success" role="alert">
<i className="fa fa-check fa-2x pull-left"></i> {this.props.msg}
</div>
} else if (this.props.msgType === 'error') {
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 61.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
} else if (this.props.msgType === 'error') {
notification = <div className="alert alert-danger" role="alert">
<i className="fa fa-times fa-2x pull-left"></i> {this.props.msg}
</div>
}
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 61.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
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
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
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
function createInternship($db, $values) {
$query = "SELECT NEXTVAL('intern_internship_seq')";
$id_result = pg_query($query);
// create new organization
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 106.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76