| 1 | <?php |
||
| 8 | class Help extends CModel |
||
| 9 | { |
||
| 10 | const TYPE_PROFILE = 1; |
||
| 11 | const TYPE_MISSION = 2; |
||
| 12 | const TYPE_SHOP = 3; |
||
|
|
|||
| 13 | const TYPE_DUEL = 4; |
||
| 14 | |||
| 15 | private $items = []; |
||
| 16 | private $topics = [ |
||
| 17 | 'profile' => 'Profil', |
||
| 18 | 'mission' => 'Megbízások', |
||
| 19 | 'shop' => 'Áron bá', |
||
| 20 | 'duel' => 'Párbaj', |
||
| 21 | 'club' => 'Klubok' |
||
| 22 | ]; |
||
| 23 | private $topic = 'profile'; |
||
| 24 | |||
| 25 | public function attributeNames() |
||
| 29 | |||
| 30 | public function getItems() |
||
| 34 | |||
| 35 | public function getTopics() |
||
| 39 | |||
| 40 | public function getRandomItemByType() |
||
| 49 | |||
| 50 | public function setTopic($topic) |
||
| 54 | |||
| 55 | public function fetchItems($limit = 0) |
||
| 72 | |||
| 73 | |||
| 74 | private function fetchMax() |
||
| 79 | } |
||
| 80 |
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.