Skip to content

Commit

Permalink
Explicitly declare parameters for barryvdh/laravel-ide-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed May 22, 2018
1 parent 68247be commit c1f8f13
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
16 changes: 2 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,7 @@ All notable changes to `swisnl/laravel-javascript-data-response` will be documen

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

## NEXT - YYYY-MM-DD

### Added
- Nothing

### Deprecated
- Nothing
## 0.1.1 - 2018-05-22

### Fixed
- Nothing

### Removed
- Nothing

### Security
- Nothing
- Explicitly declare parameters for barryvdh/laravel-ide-helper
15 changes: 13 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,22 @@ protected function registerResponseMacro(string $name)
{
Response::macro(
$name,
function () {
/**
* Return a new JavaScript data response from the application.
*
* @param string $name
* @param mixed $data
* @param int $status
* @param array $headers
* @param int $options
*
* @return \Illuminate\Http\Response
*/
function (string $name, $data = [], int $status = 200, array $headers = [], $options = 0) {
$builder = app(Builder::class);
$factory = new ResponseFactory(/* @scrutinizer ignore-type */ $this, $builder);

return $factory->make(...\func_get_args());
return $factory->make($name, $data, $status, $headers, $options);
}
);
}
Expand Down

0 comments on commit c1f8f13

Please sign in to comment.