Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach authored and actions-user committed Sep 7, 2021
1 parent 27a7ad7 commit 2512d5a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/PermissionRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private function getHydratedRole(array $item)
}

$roleClass = $this->getRoleClass();
$roleInstance = new $roleClass;
$roleInstance = new $roleClass();

return $this->cachedRoles[$roleId] = $roleInstance->newFromBuilder([
'id' => $roleId,
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/HasPermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function hasPermissionTo($permission, $guardName = null): bool
}

if (! $permission instanceof Permission) {
throw new PermissionDoesNotExist;
throw new PermissionDoesNotExist();
}

return $this->hasDirectPermission($permission) || $this->hasPermissionViaRole($permission);
Expand Down Expand Up @@ -285,7 +285,7 @@ public function hasDirectPermission($permission): bool
}

if (! $permission instanceof Permission) {
throw new PermissionDoesNotExist;
throw new PermissionDoesNotExist();
}

return $this->permissions->contains('id', $permission->id);
Expand Down
6 changes: 3 additions & 3 deletions src/WildcardPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
class WildcardPermission
{
/** @var string */
const WILDCARD_TOKEN = '*';
public const WILDCARD_TOKEN = '*';

/** @var string */
const PART_DELIMITER = '.';
public const PART_DELIMITER = '.';

/** @var string */
const SUBPART_DELIMITER = ',';
public const SUBPART_DELIMITER = ',';

/** @var string */
protected $permission;
Expand Down
2 changes: 1 addition & 1 deletion tests/HasPermissionsWithCustomModelsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class HasPermissionsWithCustomModelsTest extends HasPermissionsTest
{
/** @var bool */
protected $useCustomModels = true;

/** @test */
public function it_can_use_custom_models()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class TestCase extends Orchestra

/** @var \Spatie\Permission\Models\Permission */
protected $testAdminPermission;

/** @var bool */
protected $useCustomModels = false;

Expand Down

0 comments on commit 2512d5a

Please sign in to comment.