Skip to content

Commit 1f46ab3

Browse files
committed
More fixes codeStyle
1 parent 07b0fae commit 1f46ab3

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

app/Exceptions/Handler.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Illuminate\Auth\Access\AuthorizationException;
55
use Illuminate\Database\Eloquent\ModelNotFoundException;
66
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
7-
use Illuminate\Foundation\Validation\ValidationException;
7+
use Illuminate\Validation\ValidationException;
88
use Symfony\Component\HttpKernel\Exception\HttpException;
99

1010
class Handler extends ExceptionHandler
@@ -29,22 +29,23 @@ class Handler extends ExceptionHandler
2929
*
3030
* @param \Exception $e
3131
* @return void
32+
* @throws Exception
3233
*/
3334
public function report(Exception $e)
3435
{
35-
return parent::report($e);
36+
parent::report($e);
3637
}
3738

3839
/**
3940
* Render an exception into an HTTP response.
4041
*
4142
* @param \Illuminate\Http\Request $request
4243
* @param \Exception $e
43-
* @return \Illuminate\Http\Response
44+
* @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
4445
*/
4546
public function render($request, Exception $e)
4647
{
47-
if ($this->isHttpException($e)) {
48+
if ($e instanceof HttpException) {
4849
return $this->renderHttpException($e);
4950
} else {
5051
return parent::render($request, $e);

app/Http/Controllers/Api/PostsController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php namespace App\Http\Controllers\Api;
1+
<?php
2+
namespace App\Http\Controllers\Api;
23

34
use App\Http\Controllers\Controller;
45
use App\Http\Requests\PostStoreRequest;
@@ -89,8 +90,9 @@ public function update(Request $request, $id)
8990
/**
9091
* Delete the specified post.
9192
*
92-
* @param int $id
93-
* @return JsonResponse
93+
* @param int $id
94+
* @return void
95+
* @throws \Exception
9496
*/
9597
public function destroy($id)
9698
{

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct()
4545
*/
4646
protected function validator(array $data)
4747
{
48-
return Validator::make($data, [
48+
return \Validator::make($data, [
4949
'name' => 'required|max:255',
5050
'email' => 'required|email|max:255|unique:users',
5151
'password' => 'required|min:6|confirmed',

0 commit comments

Comments
 (0)