We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
for
1 parent 074382c commit e57a67bCopy full SHA for e57a67b
src/WildcardPermission.php
@@ -47,8 +47,9 @@ public function implies($permission): bool
47
$otherParts = $permission->getParts();
48
49
$i = 0;
50
+ $partsCount = $this->getParts()->count();
51
foreach ($otherParts as $otherPart) {
- if ($this->getParts()->count() - 1 < $i) {
52
+ if ($partsCount - 1 < $i) {
53
return true;
54
}
55
@@ -60,7 +61,7 @@ public function implies($permission): bool
60
61
$i++;
62
63
- for ($i; $i < $this->parts->count(); $i++) {
64
+ for ($i; $i < $partsCount; $i++) {
65
if (! $this->parts->get($i)->contains(static::WILDCARD_TOKEN)) {
66
return false;
67
0 commit comments