| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 90.91% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | abstract class Facade |
||
| 23 | { |
||
| 24 | use Resolvable; |
||
| 25 | |||
| 26 | 678 | public static function __callStatic($method, $args) |
|
| 27 | { |
||
| 28 | 678 | if ($instance = self::getFacadeRoot()) { |
|
| 29 | 678 | return $instance->$method(...$args); |
|
| 30 | } |
||
| 31 | |||
| 32 | throw new RuntimeException('A facade root has not been set.'); |
||
| 33 | } |
||
| 34 | |||
| 35 | 678 | public static function getFacadeRoot(): object |
|
| 36 | { |
||
| 37 | 678 | return self::resolveInstance(static::getFacadeAccessor()); |
|
| 38 | } |
||
| 39 | |||
| 40 | 677 | public static function clearResolvedInstances() |
|
| 43 | 677 | } |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return object|string |
||
| 47 | */ |
||
| 48 | 1 | protected static function getFacadeAccessor() |
|
| 51 | } |
||
| 52 | } |
||
| 53 |