diff --git a/src/Steps/Loading/Http/Paginators/QueryParams/AbstractQueryParamManipulator.php b/src/Steps/Loading/Http/Paginators/QueryParams/AbstractQueryParamManipulator.php index 8795cd79..0dc41231 100644 --- a/src/Steps/Loading/Http/Paginators/QueryParams/AbstractQueryParamManipulator.php +++ b/src/Steps/Loading/Http/Paginators/QueryParams/AbstractQueryParamManipulator.php @@ -22,6 +22,9 @@ protected function getCurrentValue(Query $query, mixed $fallbackValue = null): m return $fallbackValue; } + /** + * @throws Exception + */ protected function getCurrentValueUsingDotNotation(Query $query, mixed $fallbackValue = null): mixed { $dot = new Dot($query->toArray()); @@ -34,15 +37,14 @@ protected function getCurrentValueUsingDotNotation(Query $query, mixed $fallback */ protected function getCurrentValueAsInt(Query $query): int { - $currentValue = $this->getCurrentValue($query); - - return $currentValue === null ? 0 : (int) $currentValue; + return (int) $this->getCurrentValue($query); } + /** + * @throws Exception + */ protected function getCurrentValueAsIntUsingDotNotation(Query $query): int { - $currentValue = $this->getCurrentValueUsingDotNotation($query); - - return $currentValue === null ? 0 : (int) $currentValue; + return (int) $this->getCurrentValueUsingDotNotation($query); } }