Skip to content

Commit d1647f6

Browse files
committed
typo
1 parent 209f735 commit d1647f6

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

src/Security/IIdentity.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
interface IIdentity
1717
{
18-
1918
/**
2019
* Returns the ID of user.
2120
* @return mixed

src/Security/IResource.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
interface IResource
1717
{
18-
1918
/**
2019
* Returns a string identifier of the Resource.
2120
*/

src/Security/IRole.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
interface IRole
1717
{
18-
1918
/**
2019
* Returns a string identifier of the Role.
2120
*/

src/Security/Permission.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ public function hasRole(string $role): bool
105105
* Checks whether Role is valid and exists in the list.
106106
* @throws Nette\InvalidStateException
107107
*/
108-
private function checkRole(string $role, bool $throw = true): void
108+
private function checkRole(string $role, bool $exists = true): void
109109
{
110110
if ($role === '') {
111111
throw new Nette\InvalidArgumentException('Role must be a non-empty string.');
112112

113-
} elseif ($throw && !isset($this->roles[$role])) {
113+
} elseif ($exists && !isset($this->roles[$role])) {
114114
throw new Nette\InvalidStateException("Role '$role' does not exist.");
115115
}
116116
}
@@ -270,12 +270,12 @@ public function hasResource(string $resource): bool
270270
* Checks whether Resource is valid and exists in the list.
271271
* @throws Nette\InvalidStateException
272272
*/
273-
private function checkResource(string $resource, bool $throw = true): void
273+
private function checkResource(string $resource, bool $exists = true): void
274274
{
275275
if ($resource === '') {
276276
throw new Nette\InvalidArgumentException('Resource must be a non-empty string.');
277277

278-
} elseif ($throw && !isset($this->resources[$resource])) {
278+
} elseif ($exists && !isset($this->resources[$resource])) {
279279
throw new Nette\InvalidStateException("Resource '$resource' does not exist.");
280280
}
281281
}

0 commit comments

Comments
 (0)