Unverified Commit 55bfeb5e authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #182 from viralsolani/analysis-zEdDGy

Apply fixes from StyleCI
parents eabd3fd9 254e06e8
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace App\Http\Controllers\Api\V1; namespace App\Http\Controllers\Api\V1;
use App\Http\Requests\Backend\BlogTags\StoreApiBlogTagsRequest;
use App\Http\Resources\BlogTagsResource; use App\Http\Resources\BlogTagsResource;
use App\Models\BlogTags\BlogTag; use App\Models\BlogTags\BlogTag;
use App\Repositories\Backend\BlogTags\BlogTagsRepository; use App\Repositories\Backend\BlogTags\BlogTagsRepository;
...@@ -69,10 +68,10 @@ class BlogTagsController extends APIController ...@@ -69,10 +68,10 @@ class BlogTagsController extends APIController
} }
/** /**
* Update BlogTag * Update BlogTag.
* *
* @param BlogTag $blog_tag * @param BlogTag $blog_tag
* @param Request $request * @param Request $request
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
...@@ -92,8 +91,8 @@ class BlogTagsController extends APIController ...@@ -92,8 +91,8 @@ class BlogTagsController extends APIController
} }
/** /**
* Delete BlogTag * Delete BlogTag.
* *
* @param BlogTag $blog_tag * @param BlogTag $blog_tag
* @param DeleteBlogTagRequest $request * @param DeleteBlogTagRequest $request
* *
...@@ -109,17 +108,16 @@ class BlogTagsController extends APIController ...@@ -109,17 +108,16 @@ class BlogTagsController extends APIController
/** /**
* validate BlogTag. * validate BlogTag.
* *
* @param $request * @param $request
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function validatingRequest(Request $request, $id = 0) public function validatingRequest(Request $request, $id = 0)
{ {
$validation = Validator::make($request->all(), [ $validation = Validator::make($request->all(), [
'name' => 'required|max:191|unique:blog_tags,name,' . $id, 'name' => 'required|max:191|unique:blog_tags,name,'.$id,
]); ]);
return $validation; return $validation;
} }
} }
...@@ -64,15 +64,15 @@ class BlogsController extends APIController ...@@ -64,15 +64,15 @@ class BlogsController extends APIController
} }
$this->repository->create($request->all()); $this->repository->create($request->all());
return new BlogsResource(Blog::orderBy('created_at', 'desc')->first()); return new BlogsResource(Blog::orderBy('created_at', 'desc')->first());
} }
/** /**
* Update blog * Update blog.
* *
* @param Blog $blog * @param Blog $blog
* @param Request $request * @param Request $request
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
...@@ -92,10 +92,10 @@ class BlogsController extends APIController ...@@ -92,10 +92,10 @@ class BlogsController extends APIController
} }
/** /**
* Delete Blog * Delete Blog.
* *
* @param Blog $blog * @param Blog $blog
* @param Request $request * @param Request $request
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
...@@ -111,7 +111,7 @@ class BlogsController extends APIController ...@@ -111,7 +111,7 @@ class BlogsController extends APIController
/** /**
* validate Blog. * validate Blog.
* *
* @param $request * @param $request
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
...@@ -129,6 +129,7 @@ class BlogsController extends APIController ...@@ -129,6 +129,7 @@ class BlogsController extends APIController
return $validation; return $validation;
} }
/** /**
* validate message for validate blog. * validate message for validate blog.
* *
...@@ -141,5 +142,4 @@ class BlogsController extends APIController ...@@ -141,5 +142,4 @@ class BlogsController extends APIController
'name.max' => 'Blog Title may not be greater than 191 characters.', 'name.max' => 'Blog Title may not be greater than 191 characters.',
]; ];
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment