Skip to content

optimize for loop in WildcardPermission #2113

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Oct 23, 2022
Merged

optimize for loop in WildcardPermission #2113

merged 4 commits into from
Oct 23, 2022

Conversation

SubhanSh
Copy link
Contributor

No description provided.

@systemsolutionweb
Copy link

systemsolutionweb commented Jul 13, 2022

Why change static to self??

@SubhanSh SubhanSh requested a review from freekmurze July 16, 2022 11:55
@angeljqv
Copy link
Contributor

Why change static to self??

Yes, he is introducing a issue

for ($i; $i < $this->parts->count(); $i++) {
if (! $this->parts->get($i)->contains(static::WILDCARD_TOKEN)) {
for ($i; $i < $partsCount; $i++) {
if (! $this->parts->get($i)->contains(self::WILDCARD_TOKEN)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change static to self?

@drbyte drbyte changed the title optimize for loop optimize for loop in WildcardPermission Oct 19, 2022
@drbyte drbyte merged commit e57a67b into spatie:main Oct 23, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants