Commit 37a77d6a authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent de5ba46e
...@@ -2,19 +2,18 @@ ...@@ -2,19 +2,18 @@
namespace App\Http\Controllers\Backend\Access\User; namespace App\Http\Controllers\Backend\Access\User;
use App\Models\Access\User\User;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Access\Permission\Permission;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Repositories\Backend\Access\User\UserRepository;
use App\Http\Requests\Backend\Access\User\EditUserRequest;
use App\Http\Requests\Backend\Access\User\ShowUserRequest;
use App\Http\Requests\Backend\Access\User\StoreUserRequest;
use App\Http\Requests\Backend\Access\User\CreateUserRequest; use App\Http\Requests\Backend\Access\User\CreateUserRequest;
use App\Http\Requests\Backend\Access\User\DeleteUserRequest; use App\Http\Requests\Backend\Access\User\DeleteUserRequest;
use App\Http\Requests\Backend\Access\User\EditUserRequest;
use App\Http\Requests\Backend\Access\User\ManageUserRequest; use App\Http\Requests\Backend\Access\User\ManageUserRequest;
use App\Http\Requests\Backend\Access\User\ShowUserRequest;
use App\Http\Requests\Backend\Access\User\StoreUserRequest;
use App\Http\Requests\Backend\Access\User\UpdateUserRequest; use App\Http\Requests\Backend\Access\User\UpdateUserRequest;
use App\Models\Access\User\User;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Repositories\Backend\Access\User\UserRepository;
use Illuminate\Support\Facades\DB;
/** /**
* Class UserController. * Class UserController.
......
...@@ -4,8 +4,8 @@ namespace App\Models\Access\Permission; ...@@ -4,8 +4,8 @@ namespace App\Models\Access\Permission;
use App\Models\Access\Permission\Traits\Attribute\PermissionAttribute; use App\Models\Access\Permission\Traits\Attribute\PermissionAttribute;
use App\Models\Access\Permission\Traits\Relationship\PermissionRelationship; use App\Models\Access\Permission\Traits\Relationship\PermissionRelationship;
use App\Models\ModelTrait;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
/** /**
......
...@@ -6,8 +6,8 @@ use App\Models\Access\Role\Traits\Attribute\RoleAttribute; ...@@ -6,8 +6,8 @@ use App\Models\Access\Role\Traits\Attribute\RoleAttribute;
use App\Models\Access\Role\Traits\Relationship\RoleRelationship; use App\Models\Access\Role\Traits\Relationship\RoleRelationship;
use App\Models\Access\Role\Traits\RoleAccess; use App\Models\Access\Role\Traits\RoleAccess;
use App\Models\Access\Role\Traits\Scope\RoleScope; use App\Models\Access\Role\Traits\Scope\RoleScope;
use App\Models\ModelTrait;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
/** /**
......
...@@ -9,7 +9,6 @@ use App\Models\Access\User\Traits\UserAccess; ...@@ -9,7 +9,6 @@ use App\Models\Access\User\Traits\UserAccess;
use App\Models\Access\User\Traits\UserSendPasswordReset; use App\Models\Access\User\Traits\UserSendPasswordReset;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
/** /**
......
<?php namespace App\Models; <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class BaseModel extends Model class BaseModel extends Model
{ {
/** /**
* Generate drop-down select data with basic IDs * Generate drop-down select data with basic IDs.
* *
* @param null $id * @param null $id
* @param null $val * @param null $val
*
* @return array * @return array
*/ */
public static function getSelectData($id = null, $val = null) public static function getSelectData($id = null, $val = null)
{ {
$collection = parent::all(); $collection = parent::all();
return self::getItems($collection); return self::getItems($collection);
} }
/** /**
* Generate items for drop-down select data with basic IDs * Generate items for drop-down select data with basic IDs.
* *
* @param $collection * @param $collection
*
* @return array * @return array
*/ */
public static function getItems($collection) public static function getItems($collection)
{ {
$items = array(); $items = [];
foreach($collection as $model) foreach ($collection as $model) {
{
$items[$model->id] = [ $items[$model->id] = [
'id' => $model->id, 'id' => $model->id,
'name' => $model->name, 'name' => $model->name,
...@@ -37,14 +40,10 @@ class BaseModel extends Model ...@@ -37,14 +40,10 @@ class BaseModel extends Model
]; ];
} }
foreach($items as $id => $item) foreach ($items as $id => $item) {
{ if (isset(static::$selectHTMLFormat) && static::$selectHTMLFormat !== '') {
if(isset(static::$selectHTMLFormat) && static::$selectHTMLFormat !== '')
{
$items[$item['id']] = static::generateSelectName($item['model'], static::$selectHTMLFormat); $items[$item['id']] = static::generateSelectName($item['model'], static::$selectHTMLFormat);
} } else {
else
{
$items[$item['id']] = $item['name']; $items[$item['id']] = $item['name'];
} }
} }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
namespace App\Models\BlogCategories; namespace App\Models\BlogCategories;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\BlogCategories\Traits\Attribute\BlogCategoryAttribute; use App\Models\BlogCategories\Traits\Attribute\BlogCategoryAttribute;
use App\Models\BlogCategories\Traits\Relationship\BlogCategoryRelationship; use App\Models\BlogCategories\Traits\Relationship\BlogCategoryRelationship;
use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
class BlogCategory extends BaseModel class BlogCategory extends BaseModel
{ {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
namespace App\Models\BlogTags; namespace App\Models\BlogTags;
use App\Models\BaseModel;
use App\Models\BlogTags\Traits\Attribute\BlogTagAttribute; use App\Models\BlogTags\Traits\Attribute\BlogTagAttribute;
use App\Models\BlogTags\Traits\Relationship\BlogTagRelationship; use App\Models\BlogTags\Traits\Relationship\BlogTagRelationship;
use App\Models\ModelTrait; use App\Models\ModelTrait;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
class BlogTag extends BaseModel class BlogTag extends BaseModel
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
namespace App\Models\Blogs; namespace App\Models\Blogs;
use App\Models\BaseModel;
use App\Models\Blogs\Traits\Attribute\BlogAttribute; use App\Models\Blogs\Traits\Attribute\BlogAttribute;
use App\Models\Blogs\Traits\Relationship\BlogRelationship; use App\Models\Blogs\Traits\Relationship\BlogRelationship;
use App\Models\ModelTrait; use App\Models\ModelTrait;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
class Blog extends BaseModel class Blog extends BaseModel
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace App\Models\Cities; namespace App\Models\Cities;
use App\Models\Cities\Traits\Relationship\CityRelationship;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\Cities\Traits\Relationship\CityRelationship;
class City extends BaseModel class City extends BaseModel
{ {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
namespace App\Models\EmailTemplates; namespace App\Models\EmailTemplates;
use App\Models\BaseModel;
use App\Models\EmailTemplates\Traits\Attribute\EmailTemplateAttribute; use App\Models\EmailTemplates\Traits\Attribute\EmailTemplateAttribute;
use App\Models\ModelTrait; use App\Models\ModelTrait;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
class EmailTemplate extends BaseModel class EmailTemplate extends BaseModel
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
namespace App\Models\Faqs; namespace App\Models\Faqs;
use App\Models\BaseModel;
use App\Models\Faqs\Traits\Attribute\FaqAttribute; use App\Models\Faqs\Traits\Attribute\FaqAttribute;
use App\Models\ModelTrait; use App\Models\ModelTrait;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
class Faq extends BaseModel class Faq extends BaseModel
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace App\Models\History; namespace App\Models\History;
use App\Models\History\Traits\Relationship\HistoryRelationship;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\History\Traits\Relationship\HistoryRelationship;
/** /**
* Class History * Class History
......
...@@ -4,8 +4,8 @@ namespace App\Models\Page; ...@@ -4,8 +4,8 @@ namespace App\Models\Page;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\ModelTrait; use App\Models\ModelTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Page\Traits\Attribute\PageAttribute; use App\Models\Page\Traits\Attribute\PageAttribute;
use Illuminate\Database\Eloquent\SoftDeletes;
class Page extends BaseModel class Page extends BaseModel
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace App\Models\States; namespace App\Models\States;
use App\Models\States\Traits\Relationship\StateRelationship;
use App\Models\BaseModel; use App\Models\BaseModel;
use App\Models\States\Traits\Relationship\StateRelationship;
class State extends BaseModel class State extends BaseModel
{ {
......
...@@ -5,7 +5,6 @@ namespace App\Repositories\Api\CmsPage; ...@@ -5,7 +5,6 @@ namespace App\Repositories\Api\CmsPage;
use App\Exceptions\GeneralException; use App\Exceptions\GeneralException;
use App\Models\CMSPages\CMSPage; use App\Models\CMSPages\CMSPage;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
/** /**
* Class CmsPageRepository. * Class CmsPageRepository.
......
...@@ -4,7 +4,6 @@ namespace App\Repositories\Api\Role; ...@@ -4,7 +4,6 @@ namespace App\Repositories\Api\Role;
use App\Models\Access\Role\Role; use App\Models\Access\Role\Role;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
/** /**
* Class RoleRepository. * Class RoleRepository.
......
...@@ -4,7 +4,6 @@ namespace App\Repositories\Api\User; ...@@ -4,7 +4,6 @@ namespace App\Repositories\Api\User;
use App\Models\Access\PasswordReset\PasswordReset; use App\Models\Access\PasswordReset\PasswordReset;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
/** /**
* Class PermissionRepository. * Class PermissionRepository.
......
...@@ -6,7 +6,6 @@ use App\Mail\ConfirmAcoountMail; ...@@ -6,7 +6,6 @@ use App\Mail\ConfirmAcoountMail;
use App\Models\Access\User\User; use App\Models\Access\User\User;
use App\Repositories\Backend\Access\Role\RoleRepository; use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
/** /**
* Class PermissionRepository. * Class PermissionRepository.
......
...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException; ...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException;
use App\Models\Access\Permission\Permission; use App\Models\Access\Permission\Permission;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class PermissionRepository. * Class PermissionRepository.
......
...@@ -8,7 +8,6 @@ use App\Events\Backend\Access\Role\RoleUpdated; ...@@ -8,7 +8,6 @@ use App\Events\Backend\Access\Role\RoleUpdated;
use App\Exceptions\GeneralException; use App\Exceptions\GeneralException;
use App\Models\Access\Role\Role; use App\Models\Access\Role\Role;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
/** /**
......
...@@ -14,7 +14,6 @@ use App\Exceptions\GeneralException; ...@@ -14,7 +14,6 @@ use App\Exceptions\GeneralException;
use App\Models\Access\User\User; use App\Models\Access\User\User;
use App\Repositories\Backend\Access\Role\RoleRepository; use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
......
...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException; ...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException;
use App\Models\BlogCategories\BlogCategory; use App\Models\BlogCategories\BlogCategory;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class BlogCategoriesRepository. * Class BlogCategoriesRepository.
......
...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException; ...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException;
use App\Models\BlogTags\BlogTag; use App\Models\BlogTags\BlogTag;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class BlogTagsRepository. * Class BlogTagsRepository.
......
...@@ -13,7 +13,6 @@ use App\Models\Blogs\Blog; ...@@ -13,7 +13,6 @@ use App\Models\Blogs\Blog;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use Carbon\Carbon; use Carbon\Carbon;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class BlogsRepository. * Class BlogsRepository.
......
...@@ -8,7 +8,6 @@ use App\Exceptions\GeneralException; ...@@ -8,7 +8,6 @@ use App\Exceptions\GeneralException;
use App\Models\EmailTemplates\EmailTemplate; use App\Models\EmailTemplates\EmailTemplate;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class EmailTemplatesRepository. * Class EmailTemplatesRepository.
......
...@@ -5,7 +5,6 @@ namespace App\Repositories\Backend\Faqs; ...@@ -5,7 +5,6 @@ namespace App\Repositories\Backend\Faqs;
use App\Exceptions\GeneralException; use App\Exceptions\GeneralException;
use App\Models\Faqs\Faq; use App\Models\Faqs\Faq;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
/** /**
* Class FaqsRepository. * Class FaqsRepository.
......
...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException; ...@@ -9,7 +9,6 @@ use App\Exceptions\GeneralException;
use App\Models\Page\Page; use App\Models\Page\Page;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class PagesRepository. * Class PagesRepository.
......
...@@ -6,7 +6,6 @@ use App\Exceptions\GeneralException; ...@@ -6,7 +6,6 @@ use App\Exceptions\GeneralException;
use App\Models\Settings\Setting; use App\Models\Settings\Setting;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use DB; use DB;
use App\Models\BaseModel;
/** /**
* Class SettingsRepository. * Class SettingsRepository.
......
...@@ -5,7 +5,6 @@ namespace App\Repositories\Frontend\CMSPages; ...@@ -5,7 +5,6 @@ namespace App\Repositories\Frontend\CMSPages;
use App\Exceptions\GeneralException; use App\Exceptions\GeneralException;
use App\Models\CMSPages\CMSPage; use App\Models\CMSPages\CMSPage;
use App\Repositories\BaseRepository; use App\Repositories\BaseRepository;
use App\Models\BaseModel;
/** /**
* Class CMSPagesRepository. * Class CMSPagesRepository.
......
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