| 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()) |
||
| 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') |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param mixed $startTag |
||
| 61 | */ |
||
| 62 | public function setStartTag($startTag) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return mixed |
||
| 69 | */ |
||
| 70 | public function getEndTag() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param mixed $endTag |
||
| 77 | */ |
||
| 78 | public function setEndTag($endTag) |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return mixed |
||
| 85 | */ |
||
| 86 | public function getListItems() |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @param mixed $listItems |
||
| 93 | * |
||
| 94 | * @return DiffList |
||
| 95 | */ |
||
| 96 | public function setListItems($listItems) |
||
| 102 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.