| Total Complexity | 6 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class File |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $name; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $path; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var Resource $resource |
||
| 25 | */ |
||
| 26 | protected $resource; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * LarapiModule constructor. |
||
| 30 | * @param $name |
||
| 31 | */ |
||
| 32 | public function __construct(string $name, string $path, Resource $resource) |
||
| 33 | { |
||
| 34 | $this->name = $name; |
||
| 35 | $this->path = $path; |
||
| 36 | $this->resource = $resource; |
||
|
|
|||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getName(): string |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function getPath(): string |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getNamespace(): string |
||
| 59 | { |
||
| 60 | return $this->resource->getNamespace() . '\\' . $this->getName(); |
||
| 61 | } |
||
| 62 | |||
| 63 | public function getFileName(): string |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return Module |
||
| 70 | */ |
||
| 71 | public function getModule(): Module |
||
| 74 | } |
||
| 75 | |||
| 77 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..