Skip to content

Commit 554e43d

Browse files
authoredAug 26, 2016
Applied fixes from StyleCI (#113)
1 parent 44623e5 commit 554e43d

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed
 

‎src/Models/Role.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public function users()
6363
*
6464
* @param string $name
6565
*
66-
* @return Role
67-
*
6866
* @throws RoleDoesNotExist
67+
*
68+
* @return Role
6969
*/
7070
public static function findByName($name)
7171
{

‎src/PermissionRegistrar.php

-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ public function registerPermissions()
4444
{
4545
try {
4646
$this->getPermissions()->map(function ($permission) {
47-
4847
$this->gate->define($permission->name, function ($user) use ($permission) {
4948
return $user->hasPermissionTo($permission);
5049
});
51-
5250
});
5351

5452
return true;

‎src/PermissionServiceProvider.php

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ protected function registerModelBindings()
6060
protected function registerBladeExtensions()
6161
{
6262
$this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {
63-
6463
$bladeCompiler->directive('role', function ($role) {
6564
return "<?php if(auth()->check() && auth()->user()->hasRole({$role})): ?>";
6665
});

‎tests/TestCase.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ protected function getEnvironmentSetUp($app)
6363

6464
$app['config']->set('database.default', 'sqlite');
6565
$app['config']->set('database.connections.sqlite', [
66-
'driver' => 'sqlite',
66+
'driver' => 'sqlite',
6767
'database' => $this->getTempDirectory().'/database.sqlite',
68-
'prefix' => '',
68+
'prefix' => '',
6969
]);
7070

7171
$app['config']->set('view.paths', [__DIR__.'/resources/views']);

‎tests/User.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
namespace Spatie\Permission\Test;
44

55
use Illuminate\Auth\Authenticatable;
6+
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
67
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
78
use Illuminate\Database\Eloquent\Model;
89
use Illuminate\Foundation\Auth\Access\Authorizable;
910
use Spatie\Permission\Traits\HasRoles;
10-
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
1111

1212
class User extends Model implements AuthorizableContract, AuthenticatableContract
1313
{

0 commit comments

Comments
 (0)
Please sign in to comment.