Showing 1,011 of 9,214 total issues
Method getReputationTypes
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getReputationTypes() {
$reps = array(
1 => array(
"id" => 1,
"name" => "Like",
Method createNewsArticle_Winner
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createNewsArticle_Winner(Competition $photoComp) {
/**
* Get the winning photo
*/
Method getStatusDescription
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getStatusDescription($statusId = null) {
if (!filter_var($statusId, FILTER_VALIDATE_INT)) {
return;
}
Method __construct
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($topic_alias = false) {
parent::__construct();
if (!$topic_alias) {
return false;
Method findFromTags
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function findFromTags($tags) {
if (!is_array($tags)) {
$tags = array($tags);
}
Method members
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function members() {
$query = "SELECT l.*, s.name AS loco_status, o.operator_name, ow.operator_name AS owner_name, g.*
FROM loco_unit AS l
LEFT JOIN loco_status AS s ON l.loco_status_id = s.id
LEFT JOIN operators AS ow ON l.owner_id = ow.operator_id
Method commit
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function commit() {
$this->validate();
$data = array(
Method topics
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function topics($items_per_page = 25, $page_num = 1, $sort = "DESC") {
$query = "SELECT
SQL_CALC_FOUND_ROWS
t.*,
Method getLatest
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getLatest($update = true) {
if ($footage = $this->getLatestFootage("image")) {
return [
The class Location has 26 fields. Consider redesigning Location to keep the number of fields under 15. Open
class Location extends Locations {
/**
* Registry cache key
* @since Version 3.9.1
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Message has 23 fields. Consider redesigning Message to keep the number of fields under 15. Open
class Message extends PrivateMessages {
/**
* Message ID
* @since Version 3.3
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class User has 94 fields. Consider redesigning User to keep the number of fields under 15. Open
class User extends Base {
/**
* Registry cache key
* @since Version 3.9.1
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Job has 16 fields. Consider redesigning Job to keep the number of fields under 15. Open
class Job extends Jobs {
/**
* Job ID
* @var int $id
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Article has 29 fields. Consider redesigning Article to keep the number of fields under 15. Open
class Article extends Base {
/**
* Cache key to store and fetch the formatted lead text from the cache
* @since Version 3.10.0
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Download has 17 fields. Consider redesigning Download to keep the number of fields under 15. Open
class Download extends Base {
/**
* Download ID
* @since Version 3.2
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Image has 21 fields. Consider redesigning Image to keep the number of fields under 15. Open
class Image extends AppCore {
/**
* Max age of data before it requires refreshing
*/
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Locomotive has 32 fields. Consider redesigning Locomotive to keep the number of fields under 15. Open
class Locomotive extends Locos {
/**
* Registry cache key
* @since Version 3.9.1
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Organisation has 16 fields. Consider redesigning Organisation to keep the number of fields under 15. Open
class Organisation extends Base {
/**
* Registry key
* @since Version 3.9.1
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class LocoClass has 26 fields. Consider redesigning LocoClass to keep the number of fields under 15. Open
class LocoClass extends Locos {
/**
* Registry cache key
* @since Version 3.9.1
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}
Source https://phpmd.org/rules/codesize.html#toomanyfields
The class Camera has 21 fields. Consider redesigning Camera to keep the number of fields under 15. Open
class Camera extends Railcams {
/**
* Camera ID
* @since Version 3.4
- Read upRead up
- Exclude checks
TooManyFields
Since: 0.1
Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.
Example
class Person {
protected $one;
private $two;
private $three;
[... many more fields ...]
}