Edit PHP version constraint and update Composer dependencies

This commit is contained in:
Paul Nicoué 2025-07-04 15:08:52 +02:00
parent 231e1bce63
commit e5b51981ff
52 changed files with 806 additions and 613 deletions

View file

@ -24,16 +24,20 @@ return [
},
/**
* Allowed incremental steps between numbers (i.e `0.5`)
* Use `any` to allow any decimal value.
*/
'step' => function ($step = null) {
return $this->toNumber($step) ?? '';
'step' => function ($step = null): float|string {
return match ($step) {
'any' => 'any',
default => $this->toNumber($step) ?? ''
};
},
'value' => function ($value = null) {
return $this->toNumber($value) ?? '';
}
],
'methods' => [
'toNumber' => function ($value) {
'toNumber' => function ($value): float|null {
if ($this->isEmpty($value) === true) {
return null;
}