src/Number.php
public function setStep(float $step) : Number
    {
        $this->attributes['step'] = $step;
        $offset = isset($this->attributes['min']) ?
            $this->attributes['min'] :
            0;
        return $this->addTest('step', function ($value) use ($step, $offset) {
            if (!is_numeric($value)) {
                return false;
            }
            return !fmod($value - $offset, $step);
        });
    }
public function setStep(float $step) : Number
    {
        $this->attributes['step'] = $step;
        $offset = isset($this->attributes['min']) ?
            $this->attributes['min'] :
            0;
        return $this->addTest('step', function ($value) use ($step, $offset) {
            if (!is_numeric($value)) {
                return false;
            }
            return !fmod($value - $offset, $step);
        });
    }
public function setStep ( float $ step ) : Number { $ this -> attributes [ 'step' ] = $ step ; $ offset = isset ( $ this -> attributes [ 'min' ] ) ? $ this -> attributes [ 'min' ] : 0 ; return $ this -> addTest ( 'step' , function ( $ value ) use ( $ step , $ offset ) { if ( ! is_numeric ( $ value ) ) { return false ; } return ! fmod ( $ value - $ offset , $ step ) ; } ) ; }
Set the allowed step interval.

@param float $step
@return self
Set the allowed step interval .