Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/termTemplates/NumericTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function __construct(float | null $value = null,
return $termValue > $value;
};
break;
case self::LOWER;
case self::LOWER:
$this->fn = function (float $termValue) use ($value): bool {
return $termValue < $value;
};
Expand Down
2 changes: 1 addition & 1 deletion src/termTemplates/ValueTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@
break;
case self::STARTS:
$this->fn = function (TermInterface $term, string $value): bool {
return str_starts_with((string) $term->getValue(), $value ?? '');

Check failure on line 91 in src/termTemplates/ValueTemplate.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $value on left side of ?? always exists and is not nullable.
};
break;
case self::ENDS:
$this->fn = function (TermInterface $term, string $value): bool {
return str_ends_with((string) $term->getValue(), $value ?? '');

Check failure on line 96 in src/termTemplates/ValueTemplate.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $value on left side of ?? always exists and is not nullable.
};
break;
case self::CONTAINS:
$this->fn = function (TermInterface $term, string $value): bool {
return str_contains((string) $term->getValue(), $value ?? '');

Check failure on line 101 in src/termTemplates/ValueTemplate.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $value on left side of ?? always exists and is not nullable.
};
break;
case self::GREATER:
Expand All @@ -106,7 +106,7 @@
return $term->getValue() > $value;
};
break;
case self::LOWER;
case self::LOWER:
$this->fn = function (TermInterface $term, string $value): bool {
return $term->getValue() < $value;
};
Expand Down
Loading