1 | <?php |
||
6 | class Badge extends CModel |
||
7 | { |
||
8 | const LEVEL_BRONZE = 1; |
||
9 | const LEVEL_SILVER = 2; |
||
10 | const LEVEL_GOLD = 3; |
||
|
|||
11 | |||
12 | protected $uid; |
||
13 | protected $badges; |
||
14 | |||
15 | public function attributeNames() |
||
19 | |||
20 | public function getUid() |
||
24 | |||
25 | public function setUid($uid) |
||
29 | |||
30 | public function fetchBadges() |
||
39 | |||
40 | protected function getBadge($id) |
||
45 | } |
||
46 |
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.