File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,12 @@ public function hasRole(string $role): bool
105
105
* Checks whether Role is valid and exists in the list.
106
106
* @throws Nette\InvalidStateException
107
107
*/
108
- private function checkRole (string $ role , bool $ throw = true ): void
108
+ private function checkRole (string $ role , bool $ exists = true ): void
109
109
{
110
110
if ($ role === '' ) {
111
111
throw new Nette \InvalidArgumentException ('Role must be a non-empty string. ' );
112
112
113
- } elseif ($ throw && !isset ($ this ->roles [$ role ])) {
113
+ } elseif ($ exists && !isset ($ this ->roles [$ role ])) {
114
114
throw new Nette \InvalidStateException ("Role ' $ role' does not exist. " );
115
115
}
116
116
}
@@ -270,12 +270,12 @@ public function hasResource(string $resource): bool
270
270
* Checks whether Resource is valid and exists in the list.
271
271
* @throws Nette\InvalidStateException
272
272
*/
273
- private function checkResource (string $ resource , bool $ throw = true ): void
273
+ private function checkResource (string $ resource , bool $ exists = true ): void
274
274
{
275
275
if ($ resource === '' ) {
276
276
throw new Nette \InvalidArgumentException ('Resource must be a non-empty string. ' );
277
277
278
- } elseif ($ throw && !isset ($ this ->resources [$ resource ])) {
278
+ } elseif ($ exists && !isset ($ this ->resources [$ resource ])) {
279
279
throw new Nette \InvalidStateException ("Resource ' $ resource' does not exist. " );
280
280
}
281
281
}
You can’t perform that action at this time.
0 commit comments