Skip to content

Commit 2512d5a

Browse files
Nielsvanpachactions-user
authored andcommitted
Fix styling
1 parent 27a7ad7 commit 2512d5a

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/PermissionRegistrar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ private function getHydratedRole(array $item)
266266
}
267267

268268
$roleClass = $this->getRoleClass();
269-
$roleInstance = new $roleClass;
269+
$roleInstance = new $roleClass();
270270

271271
return $this->cachedRoles[$roleId] = $roleInstance->newFromBuilder([
272272
'id' => $roleId,

src/Traits/HasPermissions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function hasPermissionTo($permission, $guardName = null): bool
139139
}
140140

141141
if (! $permission instanceof Permission) {
142-
throw new PermissionDoesNotExist;
142+
throw new PermissionDoesNotExist();
143143
}
144144

145145
return $this->hasDirectPermission($permission) || $this->hasPermissionViaRole($permission);
@@ -285,7 +285,7 @@ public function hasDirectPermission($permission): bool
285285
}
286286

287287
if (! $permission instanceof Permission) {
288-
throw new PermissionDoesNotExist;
288+
throw new PermissionDoesNotExist();
289289
}
290290

291291
return $this->permissions->contains('id', $permission->id);

src/WildcardPermission.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
class WildcardPermission
99
{
1010
/** @var string */
11-
const WILDCARD_TOKEN = '*';
11+
public const WILDCARD_TOKEN = '*';
1212

1313
/** @var string */
14-
const PART_DELIMITER = '.';
14+
public const PART_DELIMITER = '.';
1515

1616
/** @var string */
17-
const SUBPART_DELIMITER = ',';
17+
public const SUBPART_DELIMITER = ',';
1818

1919
/** @var string */
2020
protected $permission;

tests/HasPermissionsWithCustomModelsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class HasPermissionsWithCustomModelsTest extends HasPermissionsTest
66
{
77
/** @var bool */
88
protected $useCustomModels = true;
9-
9+
1010
/** @test */
1111
public function it_can_use_custom_models()
1212
{

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class TestCase extends Orchestra
3232

3333
/** @var \Spatie\Permission\Models\Permission */
3434
protected $testAdminPermission;
35-
35+
3636
/** @var bool */
3737
protected $useCustomModels = false;
3838

0 commit comments

Comments
 (0)