| Total Complexity | 9 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class MethodCall extends Base |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $callee; |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $caller; |
||
| 18 | |||
| 19 | public function __construct(string $callee, string $caller = null) |
||
| 20 | { |
||
| 21 | $this->callee = $callee; |
||
| 22 | $this->caller = $caller; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getCallee(): string |
||
| 26 | { |
||
| 27 | return $this->callee; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getCaller(): ?string |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getType(): string |
||
| 36 | { |
||
| 37 | return DependencyGraph::TYPE_METHOD_CALL; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function isEqual(Base $that): bool |
||
| 41 | { |
||
| 42 | return ( |
||
| 43 | $that instanceof self && |
||
| 44 | $this->getCallee() === $that->getCallee() && |
||
| 45 | $this->getCaller() === $that->getCaller() |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function toString(): string |
||
| 57 | } |
||
| 58 | } |
||
| 59 |