| 1 | <?php |
||
| 12 | class Verification extends CActiveRecord |
||
| 13 | { |
||
| 14 | const TYPE_REGISTER = 1; |
||
|
|
|||
| 15 | const TYPE_CHANGE_EMAIL = 2; |
||
| 16 | const TYPE_RESET_PASSWORD = 3; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Returns the static model of the specified AR class. |
||
| 20 | * @param string $className active record class name. |
||
| 21 | * @return Verification the static model class |
||
| 22 | */ |
||
| 23 | public static function model($className = __CLASS__) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return string the associated database table name |
||
| 30 | */ |
||
| 31 | public function tableName() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Generates a random code |
||
| 38 | */ |
||
| 39 | public function generateCode() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Validates the code |
||
| 46 | */ |
||
| 47 | public function validateCode($code) |
||
| 51 | } |
||
| 52 |
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.