Skip to content

Commit

Permalink
Applied fixes from StyleCI (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Aug 26, 2016
1 parent 44623e5 commit 554e43d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Models/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function users()
*
* @param string $name
*
* @return Role
*
* @throws RoleDoesNotExist
*
* @return Role
*/
public static function findByName($name)
{
Expand Down
2 changes: 0 additions & 2 deletions src/PermissionRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ public function registerPermissions()
{
try {
$this->getPermissions()->map(function ($permission) {

$this->gate->define($permission->name, function ($user) use ($permission) {
return $user->hasPermissionTo($permission);
});

});

return true;
Expand Down
1 change: 0 additions & 1 deletion src/PermissionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ protected function registerModelBindings()
protected function registerBladeExtensions()
{
$this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {

$bladeCompiler->directive('role', function ($role) {
return "<?php if(auth()->check() && auth()->user()->hasRole({$role})): ?>";
});
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ protected function getEnvironmentSetUp($app)

$app['config']->set('database.default', 'sqlite');
$app['config']->set('database.connections.sqlite', [
'driver' => 'sqlite',
'driver' => 'sqlite',
'database' => $this->getTempDirectory().'/database.sqlite',
'prefix' => '',
'prefix' => '',
]);

$app['config']->set('view.paths', [__DIR__.'/resources/views']);
Expand Down
2 changes: 1 addition & 1 deletion tests/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace Spatie\Permission\Test;

use Illuminate\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;

class User extends Model implements AuthorizableContract, AuthenticatableContract
{
Expand Down

0 comments on commit 554e43d

Please sign in to comment.