| 1 | <?php |
||
| 19 | class MultiLang |
||
| 20 | { |
||
| 21 | |||
| 22 | 4 | public function __construct(Application $app, Redirector $redirector, MultilangLib $multilang) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Handle an incoming request. |
||
| 31 | * |
||
| 32 | * @param \Illuminate\Http\Request $request |
||
| 33 | * @param \Closure $next |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | 4 | public function handle($request, Closure $next) |
|
| 47 | } |
||
| 48 |
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: