Skip to content

Commit be1c6b6

Browse files
committed
Merge branch '3.x' of github.com:BinarCode/laravel-restify into 3.x
2 parents 0887f0e + 03368b7 commit be1c6b6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Controllers/RestResponse.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function errors($errors)
202202
*/
203203
public function addError($message)
204204
{
205-
if (!isset($this->errors)) {
205+
if (! isset($this->errors)) {
206206
$this->errors = [];
207207
}
208208

@@ -287,7 +287,7 @@ public function __get($key)
287287
return $this->$key;
288288
}
289289

290-
$code = 'static::REST_RESPONSE_' . strtoupper($key) . '_CODE';
290+
$code = 'static::REST_RESPONSE_'.strtoupper($key).'_CODE';
291291

292292
return defined($code) ? constant($code) : null;
293293
}
@@ -302,7 +302,7 @@ public function __get($key)
302302
*/
303303
public function __call($func, $args)
304304
{
305-
$code = 'static::REST_RESPONSE_' . strtoupper($func) . '_CODE';
305+
$code = 'static::REST_RESPONSE_'.strtoupper($func).'_CODE';
306306

307307
if (defined($code)) {
308308
return $this->code(constant($code));
@@ -320,7 +320,7 @@ public function __call($func, $args)
320320
*/
321321
public function respond($response = null)
322322
{
323-
if (!func_num_args()) {
323+
if (! func_num_args()) {
324324
$response = new \stdClass();
325325
$response->data = new \stdClass();
326326

@@ -660,10 +660,10 @@ public static function created()
660660
public static function index(AbstractPaginator $paginator)
661661
{
662662
return response()->json([
663-
'meta' => RepositoryCollection::meta($paginator->toArray()),
664-
'links' => RepositoryCollection::paginationLinks($paginator->toArray()),
665-
'data' => $paginator->getCollection(),
666-
]
663+
'meta' => RepositoryCollection::meta($paginator->toArray()),
664+
'links' => RepositoryCollection::paginationLinks($paginator->toArray()),
665+
'data' => $paginator->getCollection(),
666+
]
667667
);
668668
}
669669
}

0 commit comments

Comments
 (0)