| 1 | <?php |
||
| 13 | class Post extends ActiveRecordModel |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string $tableName name of the database table. |
||
| 18 | */ |
||
| 19 | protected $tableName = "Posts"; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Columns in the table. |
||
| 23 | * |
||
| 24 | * @var integer $id primary key auto incremented. |
||
| 25 | */ |
||
| 26 | public $id; |
||
| 27 | public $posttitle; |
||
| 28 | public $postname; |
||
| 29 | public $posttext; |
||
| 30 | |||
| 31 | // /** |
||
| 32 | // * Set the password. |
||
| 33 | // * |
||
| 34 | // * @param string $password the password to use. |
||
| 35 | // * |
||
| 36 | // * @return void |
||
| 37 | // */ |
||
| 38 | // public function setPassword($password) |
||
|
|
|||
| 39 | // { |
||
| 40 | // $this->password = password_hash($password, PASSWORD_DEFAULT); |
||
| 41 | // } |
||
| 42 | // |
||
| 43 | // |
||
| 44 | // /** |
||
| 45 | // * Verify the email and the password, if successful the object contains |
||
| 46 | // * all details from the database row. |
||
| 47 | // * |
||
| 48 | // * @param $email |
||
| 49 | // * @param string $password the password to use. |
||
| 50 | // * @return bool true if email and password matches, else false. |
||
| 51 | // * @internal param string $email email to check. |
||
| 52 | // */ |
||
| 53 | // public function verifyPassword($email, $password) |
||
| 54 | // { |
||
| 55 | // $this->find("email", $email); |
||
| 56 | // return password_verify($password, $this->password); |
||
| 57 | // } |
||
| 58 | |||
| 59 | 1 | public function getInformation($name) |
|
| 64 | } |
||
| 65 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.