Skip to content

Commit 7b14175

Browse files
authored
Merge pull request #191 from jeremykenedy/analysis-KoB45Q
Apply fixes from StyleCI
2 parents 8c14796 + 89921a8 commit 7b14175

8 files changed

+20
-21
lines changed

src/Database/Seeders/DefaultConnectRelationshipsSeeder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public function run()
2424
$roleAdmin = config('roles.models.role')::where('slug', '=', 'admin')->first()
2525
?? config('roles.models.role')::where('name', '=', 'Admin')->first();
2626

27-
$this->command->getOutput()->writeln("<info>Seeding:</info> DefaultConnectRelationshipsSeeder");
27+
$this->command->getOutput()->writeln('<info>Seeding:</info> DefaultConnectRelationshipsSeeder');
2828
foreach ($permissions as $permission) {
2929
$roleAdmin->attachPermission($permission);
3030
$this->command->getOutput()->writeln(
31-
"<info>Seeding:</info> DefaultConnectRelationshipsSeeder - Role:Admin attached to Permission:"
32-
. $permission->slug
31+
'<info>Seeding:</info> DefaultConnectRelationshipsSeeder - Role:Admin attached to Permission:'
32+
.$permission->slug
3333
);
3434
}
3535
}

src/Database/Seeders/DefaultPermissionsTableSeeder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function run()
4848
* Add Permission Items
4949
*
5050
*/
51-
$this->command->getOutput()->writeln("<info>Seeding:</info> DefaultPermissionitemsTableSeeder");
51+
$this->command->getOutput()->writeln('<info>Seeding:</info> DefaultPermissionitemsTableSeeder');
5252
foreach ($Permissionitems as $Permissionitem) {
5353
$newPermissionitem = config('roles.models.permission')::where('slug', '=', $Permissionitem['slug'])
5454
->first();
@@ -60,8 +60,8 @@ public function run()
6060
'model' => $Permissionitem['model'],
6161
]);
6262
$this->command->getOutput()->writeln(
63-
"<info>Seeding:</info> DefaultPermissionitemsTableSeeder - Permission:"
64-
. $Permissionitem['slug']
63+
'<info>Seeding:</info> DefaultPermissionitemsTableSeeder - Permission:'
64+
.$Permissionitem['slug']
6565
);
6666
}
6767
}

src/Database/Seeders/DefaultRolesTableSeeder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function run()
4242
* Add Role Items
4343
*
4444
*/
45-
$this->command->getOutput()->writeln("<info>Seeding:</info> DefaultRoleItemsTableSeeder");
45+
$this->command->getOutput()->writeln('<info>Seeding:</info> DefaultRoleItemsTableSeeder');
4646
foreach ($RoleItems as $RoleItem) {
4747
$newRoleItem = config('roles.models.role')::where('slug', '=', $RoleItem['slug'])->first();
4848
if ($newRoleItem === null) {
@@ -53,7 +53,7 @@ public function run()
5353
'level' => $RoleItem['level'],
5454
]);
5555
$this->command->getOutput()->writeln(
56-
"<info>Seeding:</info> DefaultRoleItemsTableSeeder - Role:" . $RoleItem['slug']
56+
'<info>Seeding:</info> DefaultRoleItemsTableSeeder - Role:'.$RoleItem['slug']
5757
);
5858
}
5959
}

src/Database/Seeders/DefaultUsersTableSeeder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function run()
2121
* Add Users
2222
*
2323
*/
24-
$this->command->getOutput()->writeln("<info>Seeding:</info> DefaultUsersTableSeeder");
24+
$this->command->getOutput()->writeln('<info>Seeding:</info> DefaultUsersTableSeeder');
2525

2626
if (config('roles.models.defaultUser')::where('email', '=', '[email protected]')->first() === null) {
2727
$newUser = config('roles.models.defaultUser')::create([
@@ -35,7 +35,7 @@ public function run()
3535
$newUser->attachPermission($permission);
3636
}
3737
$this->command->getOutput()->writeln(
38-
"<info>Seeding:</info> DefaultUsersTableSeeder - User:[email protected]"
38+
'<info>Seeding:</info> DefaultUsersTableSeeder - User:[email protected]'
3939
);
4040
}
4141

@@ -47,7 +47,7 @@ public function run()
4747
]);
4848

4949
$newUser->attachRole($userRole);
50-
$this->command->getOutput()->writeln("<info>Seeding:</info> DefaultUsersTableSeeder - User:[email protected]");
50+
$this->command->getOutput()->writeln('<info>Seeding:</info> DefaultUsersTableSeeder - User:[email protected]');
5151
}
5252
}
5353
}

src/RolesServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ private function loadSeedsFrom()
102102
);
103103
}
104104
});
105-
106105
}
107106

108107
/**

tests/RefreshDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ protected function migrateUsing()
5454
{
5555
return [
5656
/**
57-
* Non standard path
57+
* Non standard path.
5858
*
5959
* $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations'
6060
* with `vendor/orchestra/testbench-core/laravel` as basePath
6161
*
6262
* @see \Illuminate\Database\Console\Migrations\BaseCommand
6363
*/
64-
'--path' => realpath(__DIR__ . '/../src/Database/Migrations'),
64+
'--path' => realpath(__DIR__.'/../src/Database/Migrations'),
6565
'--realpath' => true,
6666
];
6767
}

tests/TestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TestCase extends OrchestraTestCase
1212
/**
1313
* Get package providers.
1414
*
15-
* @param \Illuminate\Foundation\Application $app
15+
* @param \Illuminate\Foundation\Application $app
1616
*
1717
* @return array<int, class-string>
1818
*/
@@ -24,7 +24,7 @@ protected function getPackageProviders($app)
2424
/**
2525
* Get package aliases.
2626
*
27-
* @param \Illuminate\Foundation\Application $app
27+
* @param \Illuminate\Foundation\Application $app
2828
*
2929
* @return array<string, class-string>
3030
*/
@@ -38,7 +38,7 @@ protected function getPackageAliases($app)
3838
/**
3939
* Define environment setup.
4040
*
41-
* @param \Illuminate\Foundation\Application $app
41+
* @param \Illuminate\Foundation\Application $app
4242
*
4343
* @return void
4444
*/
@@ -48,7 +48,7 @@ public function getEnvironmentSetUp($app)
4848
return new SeedHandler($app, collect());
4949
});
5050

51-
include_once __DIR__ . '/../src/Database/TestMigrations/create_users_table.php';
51+
include_once __DIR__.'/../src/Database/TestMigrations/create_users_table.php';
5252

5353
(new \jeremykenedy\LaravelRoles\Database\TestMigrations\CreateUsersTable())->up();
5454
}

tests/User.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
namespace jeremykenedy\LaravelRoles\Test;
44

55
use Illuminate\Auth\Authenticatable;
6-
use Illuminate\Database\Eloquent\Model;
7-
use Illuminate\Foundation\Auth\Access\Authorizable;
8-
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
96
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
7+
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
108
use Illuminate\Database\Eloquent\Factories\HasFactory;
9+
use Illuminate\Database\Eloquent\Model;
10+
use Illuminate\Foundation\Auth\Access\Authorizable;
1111
use jeremykenedy\LaravelRoles\Traits\HasRoleAndPermission;
1212

1313
class User extends Model implements AuthorizableContract, AuthenticatableContract

0 commit comments

Comments
 (0)