1 | <?php |
||
5 | class EvernoteContent |
||
6 | { |
||
7 | const TYPE_HTML = 'html'; |
||
8 | const TYPE_PLAIN = 'plain'; |
||
9 | |||
10 | /** @var string */ |
||
11 | protected $content; |
||
12 | |||
13 | /** @var array */ |
||
14 | protected $type = self::TYPE_PLAIN; |
||
15 | |||
16 | /** |
||
17 | * @param string $content |
||
18 | * |
||
19 | * @return static |
||
20 | */ |
||
21 | 4 | public static function create($content) |
|
25 | |||
26 | /** |
||
27 | * @param string $content |
||
28 | */ |
||
29 | 8 | public function __construct($content) |
|
33 | |||
34 | /** |
||
35 | * Set the content type to HTML. |
||
36 | * |
||
37 | * @return $this |
||
38 | */ |
||
39 | 1 | public function html() |
|
45 | |||
46 | /** |
||
47 | * Set the content type to plaintext. |
||
48 | * |
||
49 | * @return $this |
||
50 | */ |
||
51 | 1 | public function plain() |
|
57 | |||
58 | /** |
||
59 | * @return array |
||
60 | */ |
||
61 | 8 | public function toArray() |
|
68 | } |
||
69 |
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..