Conditions | 1 |
Paths | 1 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
43 | public static function simpleDispatcher(callable $routeDefinitionCallback, array $options = []) |
||
44 | { |
||
45 | 3 | return new static(simpleDispatcher(function (Collector $collector) use ($routeDefinitionCallback) { |
|
46 | 3 | return $routeDefinitionCallback(new RouteCollector($collector)); |
|
47 | 3 | }, $options)); |
|
48 | } |
||
49 | } |
||
50 |
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: