Commit ade26d19 authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent 0e316be3
......@@ -155,7 +155,7 @@ class BlogsController extends Controller
if (is_numeric($tag)) {
$tags_array[] = $tag;
} else {
$newTag = BlogTag::create(['name'=>$tag, 'status'=>1, 'created_by'=>1]);
$newTag = BlogTag::create(['name' => $tag, 'status' => 1, 'created_by' => 1]);
$tags_array[] = $newTag->id;
}
}
......
......@@ -26,7 +26,7 @@ class VerifyJWTToken
} elseif ($e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException) {
return response()->json(['token_invalid'], $e->getStatusCode());
} else {
return response()->json(['error'=>'Token is required']);
return response()->json(['error' => 'Token is required']);
}
}
......
......@@ -374,7 +374,7 @@ class Generator
'editPermission' => $this->edit_permission,
'editRoute' => $this->edit_route,
'deletePermission' => $this->delete_permission,
'deleteRoute' => $this->delete_route
'deleteRoute' => $this->delete_route,
], lcfirst($this->attribute_namespace));
//Generate Relationship File
......
......@@ -101,7 +101,7 @@ abstract class Notification
*/
public function setOptions(array $options)
{
foreach ($options as $optionKey=>$option) {
foreach ($options as $optionKey => $option) {
$methodName = 'set'.ucfirst($optionKey);
$propertyName = '_'.$optionKey;
if (method_exists($methodName, $this)) {
......
......@@ -91,7 +91,7 @@ class SendEmail
break;
}
// Send email code
$message = ['data'=>$content];
$message = ['data' => $content];
return Mail::send(['html' => 'emails.template'], $message, function ($message) use ($data) {
$message->to($data['to']);
......
......@@ -2,11 +2,11 @@
namespace App\Models\Access\Permission;
use App\Models\Access\Permission\Traits\Attribute\PermissionAttribute;
use App\Models\Access\Permission\Traits\Relationship\PermissionRelationship;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Access\Permission\Traits\Attribute\PermissionAttribute;
use App\Models\Access\Permission\Traits\Relationship\PermissionRelationship;
/**
* Class Permission.
......
......@@ -2,13 +2,13 @@
namespace App\Models\Access\Role;
use App\Models\Access\Role\Traits\Attribute\RoleAttribute;
use App\Models\Access\Role\Traits\Relationship\RoleRelationship;
use App\Models\Access\Role\Traits\RoleAccess;
use App\Models\Access\Role\Traits\Scope\RoleScope;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Access\Role\Traits\RoleAccess;
use App\Models\Access\Role\Traits\Scope\RoleScope;
use App\Models\Access\Role\Traits\Attribute\RoleAttribute;
use App\Models\Access\Role\Traits\Relationship\RoleRelationship;
/**
* Class Role.
......
......@@ -2,14 +2,14 @@
namespace App\Models\Access\User;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Access\User\Traits\UserAccess;
use App\Models\Access\User\Traits\Scope\UserScope;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Models\Access\User\Traits\UserSendPasswordReset;
use App\Models\Access\User\Traits\Attribute\UserAttribute;
use App\Models\Access\User\Traits\Relationship\UserRelationship;
use App\Models\Access\User\Traits\Scope\UserScope;
use App\Models\Access\User\Traits\UserAccess;
use App\Models\Access\User\Traits\UserSendPasswordReset;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
/**
* Class User.
......
......@@ -2,11 +2,11 @@
namespace App\Models\BlogCategories;
use App\Models\BlogCategories\Traits\Attribute\BlogCategoryAttribute;
use App\Models\BlogCategories\Traits\Relationship\BlogCategoryRelationship;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\BlogCategories\Traits\Attribute\BlogCategoryAttribute;
use App\Models\BlogCategories\Traits\Relationship\BlogCategoryRelationship;
class BlogCategory extends Model
{
......
......@@ -2,11 +2,11 @@
namespace App\Models\BlogTags;
use App\Models\BlogTags\Traits\Attribute\BlogTagAttribute;
use App\Models\BlogTags\Traits\Relationship\BlogTagRelationship;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\BlogTags\Traits\Attribute\BlogTagAttribute;
use App\Models\BlogTags\Traits\Relationship\BlogTagRelationship;
class BlogTag extends Model
{
......
......@@ -2,11 +2,11 @@
namespace App\Models\Blogs;
use App\Models\Blogs\Traits\Attribute\BlogAttribute;
use App\Models\Blogs\Traits\Relationship\BlogRelationship;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Blogs\Traits\Attribute\BlogAttribute;
use App\Models\Blogs\Traits\Relationship\BlogRelationship;
class Blog extends Model
{
......
......@@ -2,10 +2,10 @@
namespace App\Models\CMSPages;
use App\Models\CMSPages\Traits\Attribute\CMSPageAttribute;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\CMSPages\Traits\Attribute\CMSPageAttribute;
class CMSPage extends Model
{
......
......@@ -2,10 +2,10 @@
namespace App\Models\EmailTemplates;
use App\Models\EmailTemplates\Traits\Attribute\EmailTemplateAttribute;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\EmailTemplates\Traits\Attribute\EmailTemplateAttribute;
class EmailTemplate extends Model
{
......
......@@ -2,10 +2,10 @@
namespace App\Models\Faqs;
use App\Models\Faqs\Traits\Attribute\FaqAttribute;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Faqs\Traits\Attribute\FaqAttribute;
class Faq extends Model
{
......
......@@ -2,10 +2,10 @@
namespace App\Models\Menu;
use App\Models\Menu\Traits\Attribute\MenuAttribute;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Menu\Traits\Attribute\MenuAttribute;
class Menu extends Model
{
......
......@@ -2,7 +2,8 @@
namespace App\Models;
trait ModelTrait {
trait ModelTrait
{
/**
* @return string
*/
......
......@@ -53,7 +53,7 @@ class PasswordResetRepository extends BaseRepository
*/
public function update($attributes)
{
$token = ['token'=>$attributes['token']];
$token = ['token' => $attributes['token']];
return $this->query()->where('email', $attributes['email'])->update($attributes);
}
......
......@@ -57,7 +57,7 @@ class UserRepository extends BaseRepository
*/
public function resetpassword($data)
{
$pass = ['password'=>bcrypt($data['password'])];
$pass = ['password' => bcrypt($data['password'])];
return $this->query()->where('email', $data['email'])->update($pass);
}
......@@ -72,13 +72,13 @@ class UserRepository extends BaseRepository
return $this->query()
->select('first_name', 'last_name', 'email', 'address', 'country_id', 'state_id', 'city_id', 'zip_code', 'ssn', 'status', 'created_at', 'updated_at')
->where('id', $id)
->with(['country'=> function ($query) {
->with(['country' => function ($query) {
$query->select('id', 'country');
}])
->with(['state'=> function ($query) {
->with(['state' => function ($query) {
$query->select('id', 'state');
}])
->with(['city'=> function ($query) {
->with(['city' => function ($query) {
$query->select('id', 'city');
}])
->get()
......@@ -150,7 +150,7 @@ class UserRepository extends BaseRepository
**/
public function confirmUser($email)
{
$confirmed = ['confirmed'=>'1'];
$confirmed = ['confirmed' => '1'];
return $this->query()->where('email', $email)->update($confirmed);
}
......
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