From 609838cb4897e8d8bd22a4202c293be2036656c0 Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Mon, 20 Jan 2020 17:58:10 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Controllers/RestResponse.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Controllers/RestResponse.php b/src/Controllers/RestResponse.php index 5628266e9..7d88c4ba6 100644 --- a/src/Controllers/RestResponse.php +++ b/src/Controllers/RestResponse.php @@ -180,7 +180,7 @@ public function errors($errors) */ public function addError($message) { - if ( ! isset($this->errors)) { + if (! isset($this->errors)) { $this->errors = []; } @@ -265,7 +265,7 @@ public function __get($key) return $this->$key; } - $code = 'static::REST_RESPONSE_' . strtoupper($key) . '_CODE'; + $code = 'static::REST_RESPONSE_'.strtoupper($key).'_CODE'; return defined($code) ? constant($code) : null; } @@ -280,7 +280,7 @@ public function __get($key) */ public function __call($func, $args) { - $code = 'static::REST_RESPONSE_' . strtoupper($func) . '_CODE'; + $code = 'static::REST_RESPONSE_'.strtoupper($func).'_CODE'; if (defined($code)) { return $this->code(constant($code)); @@ -298,7 +298,7 @@ public function __call($func, $args) */ public function respond($response = null) { - if ( ! func_num_args()) { + if (! func_num_args()) { $response = new \stdClass(); $response->data = new \stdClass(); @@ -418,7 +418,7 @@ public function setAttributes(array $attributes) } /** - * Set "id" at root level for a model + * Set "id" at root level for a model. * * @param $id * @return mixed @@ -591,7 +591,7 @@ public function debug(\Exception $exception, $condition) } /** - * Set the JSON:API format for a single resource + * Set the JSON:API format for a single resource. * * $this->model( User::find(1) ) * @@ -604,7 +604,6 @@ public function model(Model $model) ->type($model->getTable()) ->id($model->getKey()); - return $this; } }