| 1 | <?php |
||
| 5 | class FilterModel |
||
| 6 | { |
||
| 7 | private $result; |
||
| 8 | private $valid = true; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * FilterModel constructor. |
||
| 12 | * @param $result |
||
| 13 | * @param bool $valid |
||
| 14 | */ |
||
| 15 | 4 | function __construct($result, $valid = true) |
|
| 20 | |||
| 21 | |||
| 22 | /** |
||
| 23 | * @return mixed |
||
| 24 | */ |
||
| 25 | 4 | public function getResult() |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return bool |
||
| 32 | */ |
||
| 33 | 4 | public function isValid() |
|
| 37 | |||
| 38 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.