| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 12 | protected function registerResponseMacro(string $name) |
|
| 36 | { |
||
| 37 | 12 | Response::macro( |
|
| 38 | 12 | $name, |
|
| 39 | /** |
||
| 40 | * Return a new JavaScript data response from the application. |
||
| 41 | * |
||
| 42 | * @param string $name |
||
| 43 | * @param mixed $data |
||
| 44 | * @param int $status |
||
| 45 | * @param array $headers |
||
| 46 | * @param int $options |
||
| 47 | * |
||
| 48 | * @return \Illuminate\Http\Response |
||
| 49 | */ |
||
| 50 | 12 | function (string $name, $data = [], int $status = 200, array $headers = [], $options = 0) { |
|
| 51 | 4 | $builder = app(Builder::class); |
|
| 52 | 4 | $factory = new ResponseFactory(/* @scrutinizer ignore-type */ $this, $builder); |
|
| 53 | |||
| 54 | 4 | return $factory->make($name, $data, $status, $headers, $options); |
|
| 55 | 12 | } |
|
| 64 |