Skip to content

Commit c1f8f13

Browse files
committed
Explicitly declare parameters for barryvdh/laravel-ide-helper
1 parent 68247be commit c1f8f13

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ All notable changes to `swisnl/laravel-javascript-data-response` will be documen
44

55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

7-
## NEXT - YYYY-MM-DD
8-
9-
### Added
10-
- Nothing
11-
12-
### Deprecated
13-
- Nothing
7+
## 0.1.1 - 2018-05-22
148

159
### Fixed
16-
- Nothing
17-
18-
### Removed
19-
- Nothing
20-
21-
### Security
22-
- Nothing
10+
- Explicitly declare parameters for barryvdh/laravel-ide-helper

src/ServiceProvider.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,22 @@ protected function registerResponseMacro(string $name)
3636
{
3737
Response::macro(
3838
$name,
39-
function () {
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+
function (string $name, $data = [], int $status = 200, array $headers = [], $options = 0) {
4051
$builder = app(Builder::class);
4152
$factory = new ResponseFactory(/* @scrutinizer ignore-type */ $this, $builder);
4253

43-
return $factory->make(...\func_get_args());
54+
return $factory->make($name, $data, $status, $headers, $options);
4455
}
4556
);
4657
}

0 commit comments

Comments
 (0)