@@ -72,7 +72,7 @@ |
||
72 | 72 | * |
73 | 73 | * @author Alireza Josheghani <[email protected]> |
74 | 74 | * @since 11 Nov 2016 |
75 | - * @param $message |
|
75 | + * @param string $message |
|
76 | 76 | * @return \Anetwork\Respond\Facades\Respond |
77 | 77 | */ |
78 | 78 | protected function errorException($message) |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | |
40 | 40 | $this->getTrace($exception); |
41 | 41 | |
42 | - if($exception instanceof ModelNotFoundException) { |
|
42 | + if ($exception instanceof ModelNotFoundException) { |
|
43 | 43 | return $this->modelNotFound($message); |
44 | - } elseif($exception instanceof NotFoundHttpException) { |
|
44 | + } elseif ($exception instanceof NotFoundHttpException) { |
|
45 | 45 | return $this->httpNotFound(); |
46 | - } elseif($exception instanceof BadRequestHttpException) { |
|
46 | + } elseif ($exception instanceof BadRequestHttpException) { |
|
47 | 47 | return $this->badRequest($message); |
48 | 48 | } |
49 | 49 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | protected function isApiCall(Request $request) |
131 | 131 | { |
132 | - if(strpos($request->getUri(), 'api') || $request->wantsJson()) { |
|
132 | + if (strpos($request->getUri(), 'api') || $request->wantsJson()) { |
|
133 | 133 | return true; |
134 | 134 | } |
135 | 135 | |
@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | private function getTrace(Exception $exception) |
148 | 148 | { |
149 | 149 | |
150 | - if(config('app.debug')) { |
|
150 | + if (config('app.debug')) { |
|
151 | 151 | |
152 | 152 | $traces = $exception->getTrace(); |
153 | 153 | |
154 | - if(! empty($traces)) { |
|
155 | - foreach ($traces as $trace){ |
|
154 | + if (!empty($traces)) { |
|
155 | + foreach ($traces as $trace) { |
|
156 | 156 | unset($trace['args']); |
157 | 157 | $this->trace[] = $trace; |
158 | 158 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | public function renderRestException(Request $request, Exception $exception) |
175 | 175 | { |
176 | 176 | |
177 | - if(! $this->isApiCall($request)) { |
|
177 | + if (!$this->isApiCall($request)) { |
|
178 | 178 | return parent::render($request, $exception); |
179 | 179 | } |
180 | 180 |