| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function index(Request $request, Response $response) |
||
| 18 | { |
||
| 19 | $username = $this->container['config']->get('database.drivers.mysql.username'); |
||
| 20 | |||
| 21 | ob_start(); |
||
| 22 | include VIEWS.'settings.php'; |
||
| 23 | $view = ob_get_contents(); |
||
| 24 | ob_end_clean(); |
||
| 25 | |||
| 26 | $response->write($view); |
||
| 27 | |||
| 28 | return $response; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
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: