SomeBehaviorExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getClassAnalyzerPublic() 0 4 1
A buildDefinitionFromCallablePublic() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zenify\DoctrineBehaviors\Tests\DI\AbstractBehaviorExtensionSource;
6
7
use Nette\DI\ServiceDefinition;
8
use Zenify\DoctrineBehaviors\DI\AbstractBehaviorExtension;
9
10
11
final class SomeBehaviorExtension extends AbstractBehaviorExtension
12
{
13
14
	public function getClassAnalyzerPublic() : ServiceDefinition
15
	{
16
		return parent::getClassAnalyzer();
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (getClassAnalyzer() instead of getClassAnalyzerPublic()). Are you sure this is correct? If so, you might want to change this to $this->getClassAnalyzer().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
17
	}
18
19
20
	/**
21
	 * @param string|NULL
22
	 * @return ServiceDefinition|NULL
23
	 */
24
	public function buildDefinitionFromCallablePublic($value)
25
	{
26
		return parent::buildDefinitionFromCallable($value);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (buildDefinitionFromCallable() instead of buildDefinitionFromCallablePublic()). Are you sure this is correct? If so, you might want to change this to $this->buildDefinitionFromCallable().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
27
	}
28
29
}
30