Conditions | 4 |
Paths | 3 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | protected function bindRepository($abstract, $concrete = null, $shared = true, $alias = null, $force = false): void |
||
28 | { |
||
29 | if (! $this->app->bound($abstract) || $force) { |
||
30 | $concrete = $concrete ?: $abstract; |
||
31 | $this->app->bind($abstract, $concrete, $shared); |
||
|
|||
32 | $this->app->alias($abstract, $this->prepareRepositoryAlias($alias, $concrete)); |
||
33 | } |
||
34 | } |
||
35 | |||
54 |
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: