| 1 | <?php |
||
| 5 | class DiffList |
||
| 6 | { |
||
| 7 | protected $listType; |
||
| 8 | |||
| 9 | protected $listItems = array(); |
||
| 10 | |||
| 11 | protected $attributes = array(); |
||
| 12 | |||
| 13 | protected $startTag; |
||
| 14 | |||
| 15 | protected $endTag; |
||
| 16 | |||
| 17 | public function __construct($listType, $startTag, $endTag, $listItems = array(), $attributes = array()) |
||
| 18 | { |
||
| 19 | $this->listType = $listType; |
||
| 20 | $this->startTag = $startTag; |
||
| 21 | $this->endTag = $endTag; |
||
| 22 | $this->listItems = $listItems; |
||
| 23 | $this->attributes = $attributes; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | public function getListType() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param mixed $listType |
||
| 36 | * |
||
| 37 | * @return DiffList |
||
| 38 | */ |
||
| 39 | public function setListType($listType) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | public function getStartTag() |
||
| 53 | |||
| 54 | public function getStartTagWithDiffClass($class = 'diff-list') |
||
| 55 | { |
||
| 56 | return str_replace('>', ' class="'.$class.'">', $this->startTag); |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param mixed $startTag |
||
| 61 | */ |
||
| 62 | public function setStartTag($startTag) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return mixed |
||
| 69 | */ |
||
| 70 | public function getEndTag() |
||
| 71 | { |
||
| 72 | return $this->endTag; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param mixed $endTag |
||
| 77 | */ |
||
| 78 | public function setEndTag($endTag) |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return mixed |
||
| 85 | */ |
||
| 86 | public function getListItems() |
||
| 87 | { |
||
| 88 | return $this->listItems; |
||
| 89 | } |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @param mixed $listItems |
||
| 93 | * |
||
| 94 | * @return DiffList |
||
| 95 | */ |
||
| 96 | public function setListItems($listItems) |
||
| 102 | } |
||
| 103 |
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..