| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class ServiceProvider extends BaseServiceProvider |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Bootstrap the application services. |
||
| 12 | */ |
||
| 13 | 9 | public function boot() |
|
| 18 | 9 | } |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Register the application services. |
||
| 22 | */ |
||
| 23 | 9 | public function register() |
|
| 28 | 9 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Response macro for JavaScript data. |
||
| 32 | * |
||
| 33 | * @param string $name |
||
| 34 | */ |
||
| 35 | 9 | protected function registerResponseMacro(string $name) |
|
| 36 | { |
||
| 37 | 9 | Response::macro( |
|
| 38 | 9 | $name, |
|
| 39 | 9 | function () { |
|
| 40 | 3 | $builder = app(Builder::class); |
|
| 41 | 3 | $factory = new ResponseFactory(/* @scrutinizer ignore-type */ $this, $builder); |
|
| 42 | |||
| 43 | 3 | return $factory->make(...\func_get_args()); |
|
|
|
|||
| 44 | 9 | } |
|
| 45 | ); |
||
| 46 | 9 | } |
|
| 47 | |||
| 48 | 9 | protected function getResponseMacroName(): string |
|
| 51 | } |
||
| 52 | } |
||
| 53 |