bankiru /
seo-engine
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Bankiru\Seo; |
||
| 4 | |||
| 5 | use Bankiru\Seo\Entity\LinkInterface; |
||
| 6 | |||
| 7 | final class CompiledLink implements LinkInterface |
||
| 8 | { |
||
| 9 | /** @var string */ |
||
| 10 | private $href; |
||
| 11 | |||
| 12 | /** @var string|null */ |
||
| 13 | private $title; |
||
| 14 | |||
| 15 | /** @var string[] */ |
||
| 16 | private $attributes = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * CompiledLink constructor. |
||
| 20 | * |
||
| 21 | * @param string $href |
||
| 22 | * @param string $title |
||
| 23 | * @param \string[] $attributes |
||
| 24 | */ |
||
| 25 | 1 | public function __construct($href, $title = null, array $attributes = []) |
|
| 26 | { |
||
| 27 | 1 | $this->href = $href; |
|
| 28 | 1 | $this->title = $title; |
|
| 29 | 1 | $this->attributes = $attributes; |
|
|
0 ignored issues
–
show
|
|||
| 30 | 1 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | 1 | public function getHref() |
|
| 36 | { |
||
| 37 | 1 | return $this->href; |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string|null |
||
| 42 | */ |
||
| 43 | 1 | public function getTitle() |
|
| 44 | { |
||
| 45 | 1 | return $this->title; |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string[] |
||
| 50 | */ |
||
| 51 | public function getAttributes() |
||
| 52 | { |
||
| 53 | return $this->attributes; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
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..