| 1 | <?php |
||
| 25 | class RegistrationRepository |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * Constructor |
||
| 29 | * |
||
| 30 | * @param string $request Request object |
||
| 31 | */ |
||
| 32 | 2 | public function __construct($request) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * Adds registration |
||
| 39 | * |
||
| 40 | * @param array $registration Array with registration options |
||
| 41 | * |
||
| 42 | * @return void |
||
| 43 | */ |
||
| 44 | 2 | public function addRegistration(array $registration) |
|
| 51 | } |
||
| 52 |
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: