src/Entity/Event.php
Method initPropertyMapDefinition
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function initPropertyMapDefinition() {
static::$propertyMapDefinition
->addPropertyMap(
new PropertyDefinition('idEvent'),
new PropertyDefinition('id')
Event
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Event extends Entity implements EventInterface {
/**
* {@inheritdoc}
*/
File Event.php
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @file
* Contains \TheSportsDb\Entity\Event.
*/
The class Event has an overall complexity of 53 which is very high. The configured complexity threshold is 50. Open
Open
class Event extends Entity implements EventInterface {
/**
* {@inheritdoc}
*/
- Exclude checks
The class Event has 50 public methods and attributes. Consider reducing the number of public items to less than 50. Open
Open
class Event extends Entity implements EventInterface {
/**
* {@inheritdoc}
*/
- Read upRead up
- Exclude checks
ExcessivePublicCount
Since: 0.1
A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.
Example
public class Foo {
public $value;
public $something;
public $var;
// [... more more public attributes ...]
public function doWork() {}
public function doMoreWork() {}
public function doWorkAgain() {}
// [... more more public methods ...]
}
Source https://phpmd.org/rules/codesize.html#excessivepubliccount
The method initPropertyMapDefinition() has 197 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
protected static function initPropertyMapDefinition() {
static::$propertyMapDefinition
->addPropertyMap(
new PropertyDefinition('idEvent'),
new PropertyDefinition('id')
- Exclude checks
Avoid unused parameters such as '$value'. Open
Open
public static function reverseEventTime($value, Event $context) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$value'. Open
Open
public static function transformEventTime($value) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}