| 1 | <?php |
||
| 15 | class CountUsersAction extends Action |
||
| 16 | { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * CountUsersAction constructor. |
||
| 20 | * |
||
| 21 | * @param \App\Containers\User\Settings\Repositories\UserRepository $userRepository |
||
| 22 | */ |
||
| 23 | public function __construct(UserRepository $userRepository) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | public function all() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return mixed |
||
| 38 | * @throws \Prettus\Repository\Exceptions\RepositoryException |
||
| 39 | */ |
||
| 40 | public function visitors() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return mixed |
||
| 49 | * @throws \Prettus\Repository\Exceptions\RepositoryException |
||
| 50 | */ |
||
| 51 | public function registered() |
||
| 57 | |||
| 58 | } |
||
| 59 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: