Skip to content

Commit

Permalink
Merge pull request #670 from viralsolani/analysis-or2ZMb
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
viralsolani authored Aug 20, 2020
2 parents 50c2fae + ed786cb commit a5af0d8
Show file tree
Hide file tree
Showing 30 changed files with 93 additions and 81 deletions.
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
InstallAppCommand::class,
InstallAppCommand::class,
];

/**
Expand Down
8 changes: 4 additions & 4 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ public function setStatusCode($statusCode)
protected function respondWithError($message)
{
return $this->respond([
'error' => [
'message' => $message,
'status_code' => $this->getStatusCode(),
],
'error' => [
'message' => $message,
'status_code' => $this->getStatusCode(),
],
]);
}

Expand Down
10 changes: 5 additions & 5 deletions app/Http/Controllers/Api/V1/APIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function respondWithPagination($items, $data)
'total_pages' => ceil($items->total() / $items->perPage()),
'current_page' => $items->currentPage(),
'limit' => $items->perPage(),
],
],
]);

return $this->respond($data);
Expand Down Expand Up @@ -113,10 +113,10 @@ public function respondCreatedWithData($data)
public function respondWithError($message)
{
return $this->respond([
'error' => [
'message' => $message,
'status_code' => $this->getStatusCode(),
],
'error' => [
'message' => $message,
'status_code' => $this->getStatusCode(),
],
]);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Backend/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function getPermissionByRole(Request $request)
$results['rolePermissions'] = $rolePermissions;
$results['allPermissions'] = $rsRolePermissions->all;
echo json_encode($results);
die;
exit;
}
}
}
4 changes: 2 additions & 2 deletions app/Http/Controllers/Backend/NotificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function ajaxNotifications()
* pass jsonencode array
*/
echo json_encode($passArray);
die;
exit;
}

/*
Expand All @@ -68,7 +68,7 @@ public function clearCurrentNotifications()
{
$userId = Auth::user()->id;
echo $this->notification->clearNotifications(5);
die;
exit;
}

/**
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@

class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
use AuthorizesRequests;
use DispatchesJobs;
use ValidatesRequests;
}
3 changes: 2 additions & 1 deletion app/Mail/ConfirmAcoountMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class ConfirmAcoountMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Create a new message instance.
Expand Down
3 changes: 2 additions & 1 deletion app/Mail/ForgotPasswordMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class ForgotPasswordMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Create a new message instance.
Expand Down
8 changes: 4 additions & 4 deletions app/Models/Access/PasswordReset/PasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class PasswordReset extends BaseModel
protected $table = 'password_resets';

protected $fillable = [
'email',
'token',
'',
];
'email',
'token',
'',
];
}
6 changes: 3 additions & 3 deletions app/Models/Access/User/Traits/Attribute/UserAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ public function getLoginAsButtonAttribute($class)
'admin.access.user.login-as',
$this
).'"><i class="fa fa-lock" data-toggle="tooltip" data-placement="top" title="'.trans(
'buttons.backend.access.users.login_as',
['user' => $this->name]
).'"></i>'.$name.'</a>';
'buttons.backend.access.users.login_as',
['user' => $this->name]
).'"></i>'.$name.'</a>';
}
}

Expand Down
16 changes: 8 additions & 8 deletions app/Models/Access/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*/
class User extends Authenticatable
{
use UserScope,
UserAccess,
Notifiable,
SoftDeletes,
UserAttribute,
UserRelationship,
UserSendPasswordReset,
HasApiTokens;
use UserScope;
use UserAccess;
use Notifiable;
use SoftDeletes;
use UserAttribute;
use UserRelationship;
use UserSendPasswordReset;
use HasApiTokens;

/**
* The database table used by the model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function update($permission, array $input)
$permission->status = 1;
$permission->updated_by = access()->user()->id;

DB::transaction(function () use ($permission, $input) {
DB::transaction(function () use ($permission) {
if ($permission->save()) {
event(new PermissionUpdated($permission));

Expand Down
14 changes: 7 additions & 7 deletions config/cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
],

'expose_headers' => [
'Cache-Control',
'Content-Language',
'Content-Type',
'Expires',
'Last-Modified',
'Pragma',
],
'Cache-Control',
'Content-Language',
'Content-Type',
'Expires',
'Last-Modified',
'Pragma',
],

'forbidden_response' => [
'message' => 'Forbidden (cors).',
Expand Down
24 changes: 12 additions & 12 deletions config/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

return [

// After App\Http\Controllers
// Default : Backend
'controller_namespace' => 'Backend',
// After App\Http\Controllers
// Default : Backend
'controller_namespace' => 'Backend',

// After App\Http\Requests
// Default : Backend
'request_namespace' => 'Backend',
// After App\Http\Requests
// Default : Backend
'request_namespace' => 'Backend',

// After App\Repositories
// Default : Backend
'repository_namespace'=> 'Backend',
// After App\Repositories
// Default : Backend
'repository_namespace'=> 'Backend',

// views folder after resources/views
// Default : backend
'views_folder' => 'backend',
// views folder after resources/views
// Default : backend
'views_folder' => 'backend',

];
8 changes: 4 additions & 4 deletions database/DisableForeignKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ trait DisableForeignKeys
*/
private $commands = [
'mysql' => [
'enable' => 'SET FOREIGN_KEY_CHECKS=1;',
'disable' => 'SET FOREIGN_KEY_CHECKS=0;',
'enable' => 'SET FOREIGN_KEY_CHECKS=1;',
'disable' => 'SET FOREIGN_KEY_CHECKS=0;',
],
'sqlite' => [
'enable' => 'PRAGMA foreign_keys = ON;',
'disable' => 'PRAGMA foreign_keys = OFF;',
'enable' => 'PRAGMA foreign_keys = ON;',
'disable' => 'PRAGMA foreign_keys = OFF;',
],
'sqlsrv' => [
'enable' => 'EXEC sp_msforeachtable @command1="print \'?\'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all";',
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/Access/PermissionRoleSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
*/
class PermissionRoleSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/Access/PermissionTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
*/
class PermissionTableSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/Access/PermissionUserSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/
class PermissionUserSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/Access/RoleTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*/
class RoleTableSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/Access/UserRoleSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/
class UserRoleSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/Access/UserTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*/
class UserTableSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/HistoryTypeTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*/
class HistoryTypeTableSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seed.
Expand Down
3 changes: 2 additions & 1 deletion database/seeds/PagesTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class PagesTableSeeder extends Seeder
{
use DisableForeignKeys, TruncateTable;
use DisableForeignKeys;
use TruncateTable;

/**
* Run the database seeds.
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/en/labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
'url' => 'URL',
'url_type' => 'URL Type',
'url_types' => [
'route' => 'Route',
'static' => 'Static',
'route' => 'Route',
'static' => 'Static',
],
'open_in_new_tab' => 'Open URL in new tab',
'view_permission_id' => 'Permission',
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/en/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'add-new' => 'Add new',
'deactivated-users' => 'Deactivated Users',
'deleted-users' => 'Deleted Users',
],
],
],

'log-viewer' => [
Expand Down
12 changes: 6 additions & 6 deletions resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@
],
],
'faqs' => [
'question' => 'Question',
'answer' => 'Answer',
'status' => 'Status',
'question' => 'Question',
'answer' => 'Answer',
'status' => 'Status',
],
],

Expand Down Expand Up @@ -274,9 +274,9 @@
'city_required' => 'Please enter city.',
],
'confirmaccount' => [
'already_confirmed' => 'Account is already confirmed.',
'invalid_otp' => 'Please enter valid otp.',
'invalid_email' => 'Email is not register with fin builders',
'already_confirmed' => 'Account is already confirmed.',
'invalid_otp' => 'Please enter valid otp.',
'invalid_email' => 'Email is not register with fin builders',
],
],

Expand Down
4 changes: 2 additions & 2 deletions resources/lang/fr/exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@
'delete_error' => 'Il y a eu un problème lors de la suppression de ce menu. Veuillez essayer à nouveau.',
'not_found' => "Ce menu n'existe pas.",
'update_error' => 'Il y a eu un problème lors de la mise à jour de ce menu. Veuillez essayer à nouveau.',
],
],

'modules' => [
'already_exists' => 'Ce module existe déjà. Veuillez choisr un autre nom.',
'create_error' => 'Il y a eu un problème lors de la création de ce module. Veuillez essayer à nouveau.',
'delete_error' => 'Il y a eu un problème lors de la suppression de ce module. Veuillez essayer à nouveau.',
'not_found' => "Ce module n'existe pas.",
'update_error' => 'Il y a eu un problème lors de la mise à jour de ce module. Veuillez essayer à nouveau.',
],
],

],

Expand Down
4 changes: 2 additions & 2 deletions resources/lang/fr/labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@
'url' => 'URL',
'url_type' => 'URL Type',
'url_types' => [
'route' => 'Route',
'static' => 'Statique',
'route' => 'Route',
'static' => 'Statique',
],
'open_in_new_tab' => 'Ouvrir dans un nouvel onglet',
'view_permission_id' => 'Permission',
Expand Down
Loading

0 comments on commit a5af0d8

Please sign in to comment.