Lines
64.28%
9 / 14
Methods
64.28%
9 / 14
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| register | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| provides | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] boot | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] isDeferred | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] call | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| [Lucent\Container\ServiceProvider] make | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] bind | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| [Lucent\Container\ServiceProvider] singleton | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] instance | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] alias | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lucent\Container\ServiceProvider] when | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| [Lucent\Container\ServiceProvider] tag | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| [Lucent\Container\ServiceProvider] tagged | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| 15 | class ExceptionsServiceProvider extends ServiceProvider | |
| 16 | { | |
| 17 | /** | |
| 18 | * Whether the provider is deferred until the manager is first resolved. | |
| 19 | * | |
| 20 | * @var bool | |
| 21 | */ | |
| 22 | protected bool $defer = true; | |
| 23 | ||
| 24 | /** | |
| 25 | * Register the exception manager as a lazy singleton. | |
| 26 | */ | |
| 27 | public function register(): void | |
| 28 | { | |
| 29 | $this->singleton(Exceptions::class); | |
| 30 | } | |
| 31 | ||
| 32 | /** | |
| 33 | * The service this provider provides, used for deferred loading. | |
| 34 | * | |
| 35 | * @return array<int, string> The provided service identifiers | |
| 36 | */ | |
| 37 | public function provides(): array | |
| 38 | { | |
| 39 | return [Exceptions::class]; | |
| 40 | } | |
| 41 | } |
Inherited from Lucent\Container\ServiceProvider
| 53 | public function __construct(Container $container) | |
| 54 | { | |
| 55 | $this->container = $container; | |
| 56 | } |
| 75 | public function boot(): void | |
| 76 | { | |
| 77 | } |
| 97 | public function isDeferred(): bool | |
| 98 | { | |
| 99 | return $this->defer; | |
| 100 | } |
| 112 | protected function call(callable|string|array $callback, array $parameters = [], ?string $defaultMethod = null): mixed | |
| 113 | { | |
| 114 | return $this->container->call($callback, $parameters, $defaultMethod); | |
| 115 | } |
| 126 | protected function make(string $abstract, array $parameters = []): mixed | |
| 127 | { | |
| 128 | return $this->container->make($abstract, $parameters); | |
| 129 | } |
| 140 | protected function bind(string|callable $abstract, string|callable|null $concrete = null): void | |
| 141 | { | |
| 142 | $this->container->bind($abstract, $concrete); | |
| 143 | } |
| 154 | protected function singleton(string|callable $abstract, string|callable|null $concrete = null): void | |
| 155 | { | |
| 156 | $this->container->singleton($abstract, $concrete); | |
| 157 | } |
| 168 | protected function instance(string|object $abstract, ?object $instance = null): object | |
| 169 | { | |
| 170 | return $this->container->instance($abstract, $instance); | |
| 171 | } |
| 183 | protected function alias(string $abstract, string $alias): void | |
| 184 | { | |
| 185 | $this->container->alias($abstract, $alias); | |
| 186 | } |
| 196 | protected function when(string $concrete): ContextualBindingBuilder | |
| 197 | { | |
| 198 | return $this->container->when($concrete); | |
| 199 | } |
| 210 | protected function tag(string|array $abstracts, array $tags): void | |
| 211 | { | |
| 212 | $this->container->tag($abstracts, $tags); | |
| 213 | } |
| 223 | protected function tagged(string $tag): array | |
| 224 | { | |
| 225 | return $this->container->tagged($tag); | |
| 226 | } |