| 1 | <?php |
||
| 11 | class LineChart extends Chart |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var LineChartOptions |
||
| 15 | */ |
||
| 16 | protected $options; |
||
| 17 | |||
| 18 | 1 | public function __construct() |
|
| 19 | { |
||
| 20 | 1 | parent::__construct(); |
|
| 21 | |||
| 22 | 1 | $this->options = new LineChartOptions(); |
|
| 23 | 1 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | */ |
||
| 28 | 1 | public function getType() |
|
| 29 | { |
||
| 30 | 1 | return 'LineChart'; |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritdoc} |
||
| 35 | */ |
||
| 36 | 1 | public function getPackage() |
|
| 37 | { |
||
| 38 | 1 | return 'corechart'; |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return LineChartOptions |
||
| 43 | */ |
||
| 44 | 1 | public function getOptions() |
|
| 45 | { |
||
| 46 | 1 | return $this->options; |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param $options LineChartOptions |
||
| 51 | * |
||
| 52 | * @return LineChart |
||
| 53 | */ |
||
| 54 | public function setOptions($options) |
||
| 60 | } |
||
| 61 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.