| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public static function globalEndpoints(string $controller = null, $parameters = null): EndpointResource |
||
| 29 | { |
||
| 30 | $endPointResource = new EndpointResource(null, EndpointResourceType::GLOBAL); |
||
| 31 | |||
| 32 | if ($controller !== null) { |
||
| 33 | $endPointResource->addController($controller, Arr::wrap($parameters)); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $endPointResource; |
||
| 37 | } |
||
| 38 | |||
| 63 |
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: