@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | // default responders |
| 79 | 79 | $this->responders = array( |
| 80 | - 'json' => function ($data) { |
|
| 80 | + 'json' => function($data) { |
|
| 81 | 81 | if ($data instanceof DataResponse) { |
| 82 | 82 | $response = new JSONResponse( |
| 83 | 83 | $data->getData(), |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * @since 7.0.0 |
| 107 | 107 | * @since 9.1.0 Added default parameter |
| 108 | 108 | */ |
| 109 | - public function getResponderByHTTPHeader($acceptHeader, $default='json') { |
|
| 109 | + public function getResponderByHTTPHeader($acceptHeader, $default = 'json') { |
|
| 110 | 110 | $headers = explode(',', $acceptHeader); |
| 111 | 111 | |
| 112 | 112 | // return the first matching responder |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | * @return Response |
| 146 | 146 | * @since 7.0.0 |
| 147 | 147 | */ |
| 148 | - public function buildResponse($response, $format='json') { |
|
| 149 | - if(array_key_exists($format, $this->responders)) { |
|
| 148 | + public function buildResponse($response, $format = 'json') { |
|
| 149 | + if (array_key_exists($format, $this->responders)) { |
|
| 150 | 150 | |
| 151 | 151 | $responder = $this->responders[$format]; |
| 152 | 152 | |
@@ -154,6 +154,6 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | } |
| 156 | 156 | throw new \DomainException('No responder registered for format '. |
| 157 | - $format . '!'); |
|
| 157 | + $format.'!'); |
|
| 158 | 158 | } |
| 159 | 159 | } |