Showing 31 of 92 total issues
Function raw
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function raw() {
if (isset($this->_raw)) {
return $this->_raw;
}
$this->_raw = new \stdClass();
- Read upRead up
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 initPropertyMap
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function initPropertyMap($entityType) {
$this->propertyMaps[$entityType] = new Map();
$entityManager = $this;
foreach ($this->getPropertyMapDefinition($entityType)->getPropertyMaps() as $map) {
$args = [
Function initPropertyMap
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function initPropertyMap($entityType) {
$this->propertyMaps[$entityType] = new Map();
$entityManager = $this;
foreach ($this->getPropertyMapDefinition($entityType)->getPropertyMaps() as $map) {
$args = [
- Read upRead up
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 raw
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function raw() {
if ($this->entity) {
$this->_raw = $this->entity->raw();
return $this->_raw;
}
- Read upRead up
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 transform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function transform($value, $context, EntityManagerInterface $entityManager, $entityType, $idName, array $contextPropertyMap = array()) {
Function loadSeasons
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function loadSeasons() {
$leagueData = $this->sportsDbClient->doRequest('lookupleague.php', array('id' => $this->properties->id, 's' => 'all'));
if (isset($leagueData->leagues)) {
$leagues = $leagueData->leagues;
foreach ($leagues as &$league) {
- Read upRead up
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 update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function update(\stdClass $values) {
if ($this->entity instanceof EntityInterface) {
$this->entity->update($values);
return;
}
- Read upRead up
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
The method initPropertyMapDefinition() has 197 lines of code. Current threshold is set to 100. Avoid really long methods. Open
protected static function initPropertyMapDefinition() {
static::$propertyMapDefinition
->addPropertyMap(
new PropertyDefinition('idEvent'),
new PropertyDefinition('id')
- Exclude checks
The method initPropertyMapDefinition() has 102 lines of code. Current threshold is set to 100. Avoid really long methods. Open
protected static function initPropertyMapDefinition() {
static::$propertyMapDefinition
->addPropertyMap(
new PropertyDefinition('idLeague'),
new PropertyDefinition('id')
- Exclude checks
The method initPropertyMapDefinition() has 112 lines of code. Current threshold is set to 100. Avoid really long methods. Open
protected static function initPropertyMapDefinition() {
static::$propertyMapDefinition
->addPropertyMap(
new PropertyDefinition('idPlayer'),
new PropertyDefinition('id')
- Exclude checks
The method initPropertyMapDefinition() has 129 lines of code. Current threshold is set to 100. Avoid really long methods. Open
protected static function initPropertyMapDefinition() {
static::$propertyMapDefinition
->addPropertyMap(
new PropertyDefinition('idTeam'),
new PropertyDefinition('id')
- Exclude checks