| 1 | <?php |
||
| 5 | trait Config |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Get a config value. |
||
| 9 | * |
||
| 10 | * @param $string |
||
| 11 | * @param array $children |
||
| 12 | * |
||
| 13 | * @throws \Exception |
||
| 14 | * |
||
| 15 | * @return mixed |
||
| 16 | */ |
||
| 17 | protected function config($string, $children = []) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get or make an auth instance. |
||
| 30 | * |
||
| 31 | * @return \Illuminate\Foundation\Application|mixed |
||
| 32 | */ |
||
| 33 | protected function getAuth() |
||
| 41 | } |
||
| 42 |
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: