Skip to content

Commit

Permalink
Replace PHP assert by phpstan assert in `AbstractSubtreeTagBasedPrivi…
Browse files Browse the repository at this point in the history
…lege`
  • Loading branch information
bwaidelich committed Nov 6, 2024
1 parent 643ce49 commit da297ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ abstract class AbstractSubtreeTagBasedPrivilege extends AbstractPrivilege
private SubtreeTags|null $subtreeTagsRuntimeCache = null;
private ContentRepositoryId|null $contentRepositoryIdRuntimeCache = null;

/** @phpstan-assert !null $this->subtreeTagsRuntimeCache */
private function initialize(): void
{
if ($this->initialized) {
Expand Down Expand Up @@ -66,7 +67,6 @@ public function matchesSubject(PrivilegeSubjectInterface $subject): bool
public function getSubtreeTags(): SubtreeTags
{
$this->initialize();
assert($this->subtreeTagsRuntimeCache !== null);
return $this->subtreeTagsRuntimeCache;
}

Expand Down

0 comments on commit da297ec

Please sign in to comment.