Skip to content

Commit

Permalink
Update Group.php
Browse files Browse the repository at this point in the history
added !empty() so it returns bool and passes phpstan
  • Loading branch information
bgeneto authored Nov 13, 2024
1 parent b1189be commit 25834d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Entities/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function can(string $permission): bool

return $this->permissions !== null
&& $this->permissions !== []
&& array_intersect($checks, $this->permissions);
&& !empty(array_intersect($checks, $this->permissions));

Check failure on line 98 in src/Entities/Group.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 8.2 Static Analysis

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 98 in src/Entities/Group.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 8.3 Static Analysis

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 98 in src/Entities/Group.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 8.0 Static Analysis

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 98 in src/Entities/Group.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 7.4 Static Analysis

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 98 in src/Entities/Group.php

View workflow job for this annotation

GitHub Actions / phpstan / PHP 8.1 Static Analysis

Construct empty() is not allowed. Use more strict comparison.
}

/**
Expand Down

0 comments on commit 25834d3

Please sign in to comment.