| Conditions | 4 |
| Paths | 6 |
| Total Lines | 28 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | private function checkIfTypeIsAnInterface(Node $node, Name $type) |
||
| 47 | { |
||
| 48 | $name = (string) $type; |
||
| 49 | |||
| 50 | if($type->isFullyQualified() === false) |
||
| 51 | { |
||
| 52 | $name = $this->currentNamespace . '\\' . $name; |
||
| 53 | } |
||
| 54 | |||
| 55 | if(isset($this->types[$name])) |
||
| 56 | { |
||
| 57 | $objectTypeType= $this->types[$name]; |
||
| 58 | |||
| 59 | if($objectTypeType !== ObjectType::TYPE_INTERFACE) |
||
| 60 | { |
||
| 61 | $defect = new DependencyUponImplementation( |
||
| 62 | $node, |
||
| 63 | $name, |
||
| 64 | $objectTypeType, |
||
| 65 | $this->currentMethod->name |
||
| 66 | ); |
||
| 67 | |||
| 68 | $defect->setContext($this->currentMethod); |
||
| 69 | |||
| 70 | $this->dispatch($defect); |
||
| 71 | } |
||
| 72 | } |
||
| 73 | } |
||
| 74 | } |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.