@@ -7,9 +7,6 @@ |
||
| 7 | 7 | use App\Transformers\TagTransformer; |
| 8 | 8 | use Illuminate\Http\Response as IlluminateResponse; |
| 9 | 9 | use Illuminate\Http\Request; |
| 10 | - |
|
| 11 | -use App\Http\Requests; |
|
| 12 | -use App\Http\Controllers\Controller; |
|
| 13 | 10 | use Illuminate\Support\Facades\Input; |
| 14 | 11 | use Illuminate\Support\Facades\Response; |
| 15 | 12 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function store() |
| 56 | 56 | { |
| 57 | - if (!Input::get('title')) |
|
| 57 | + if ( ! Input::get('title')) |
|
| 58 | 58 | { |
| 59 | 59 | return $this->setStatusCode(IlluminateResponse::HTTP_UNPROCESSABLE_ENTITY) |
| 60 | 60 | ->respondWithError('Parameters failed validation for a task.'); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public function show($id) |
| 72 | 72 | { |
| 73 | 73 | $tag = Tag::find($id); |
| 74 | - if (!$tag) { |
|
| 74 | + if ( ! $tag) { |
|
| 75 | 75 | return $this->respondNotFound('Tag does not exsist'); |
| 76 | 76 | } |
| 77 | 77 | return $this->respond([ |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | public function update(Request $request, $id) |
| 99 | 99 | { |
| 100 | 100 | $tag = Tag::find($id); |
| 101 | - if (!$tag) |
|
| 101 | + if ( ! $tag) |
|
| 102 | 102 | { |
| 103 | 103 | return $this->respondNotFound('Tag does not exist!'); |
| 104 | 104 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function store() |
| 47 | 47 | { |
| 48 | - if (!Input::get('name') or !Input::get('done') or !Input::get('priority')) |
|
| 48 | + if ( ! Input::get('name') or ! Input::get('done') or ! Input::get('priority')) |
|
| 49 | 49 | { |
| 50 | 50 | return $this->setStatusCode(IlluminateResponse::HTTP_UNPROCESSABLE_ENTITY) |
| 51 | 51 | ->respondWithError('Parameters failed validation for a task.'); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public function show($id) |
| 63 | 63 | { |
| 64 | 64 | $task = Task::find($id); |
| 65 | - if (!$task) { |
|
| 65 | + if ( ! $task) { |
|
| 66 | 66 | return $this->respondNotFound('Task does not exsist'); |
| 67 | 67 | } |
| 68 | 68 | return $this->respond([ |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | public function update(Request $request, $id) |
| 90 | 90 | { |
| 91 | 91 | $task = Task::find($id); |
| 92 | - if (!$task) |
|
| 92 | + if ( ! $task) |
|
| 93 | 93 | { |
| 94 | 94 | return $this->respondNotFound('Task does not exist!!'); |
| 95 | 95 | } |
@@ -13,12 +13,12 @@ |
||
| 13 | 13 | |
| 14 | 14 | use Faker\Provider\es_ES\Person; |
| 15 | 15 | |
| 16 | -Route::get('/', function () { |
|
| 16 | +Route::get('/', function() { |
|
| 17 | 17 | return view('welcome'); |
| 18 | 18 | }); |
| 19 | 19 | |
| 20 | 20 | |
| 21 | -Route::get('/auth/login', function () { |
|
| 21 | +Route::get('/auth/login', function() { |
|
| 22 | 22 | return 'No tens acces a la API'; |
| 23 | 23 | }); |
| 24 | 24 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * Time: 16:21 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -Route::group(['middleware' => ['auth']], function () { |
|
| 9 | +Route::group(['middleware' => ['auth']], function() { |
|
| 10 | 10 | Route::get('task/{id}/tag', 'TagController@index'); |
| 11 | 11 | Route::resource('task', 'TaskController'); |
| 12 | 12 | Route::resource('tag', 'TagController'); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | return [ |
| 18 | 18 | 'name' => $task['name'], |
| 19 | 19 | 'done' => (boolean) $task['done'], |
| 20 | - 'priority' =>(int)$task['priority'], |
|
| 20 | + 'priority' =>(int) $task['priority'], |
|
| 21 | 21 | ]; |
| 22 | 22 | } |
| 23 | 23 | |