File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public function hasRole(string $role): bool
107107 */
108108 private function checkRole (string $ role , bool $ throw = true ): void
109109 {
110- if (! is_string ( $ role ) || $ role === '' ) {
110+ if ($ role === '' ) {
111111 throw new Nette \InvalidArgumentException ('Role must be a non-empty string. ' );
112112
113113 } elseif ($ throw && !isset ($ this ->roles [$ role ])) {
@@ -272,7 +272,7 @@ public function hasResource(string $resource): bool
272272 */
273273 private function checkResource (string $ resource , bool $ throw = true ): void
274274 {
275- if (! is_string ( $ resource ) || $ resource === '' ) {
275+ if ($ resource === '' ) {
276276 throw new Nette \InvalidArgumentException ('Resource must be a non-empty string. ' );
277277
278278 } elseif ($ throw && !isset ($ this ->resources [$ resource ])) {
You can’t perform that action at this time.
0 commit comments