src/Core/Spectra/IonTrait.php
public function setRetentionTimeWindow($retentionTimeStart, $retentionTimeEnd)
    {
        if (! (is_int($retentionTimeStart) || is_float($retentionTimeStart))) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type int or float. Value is of type ' . gettype($retentionTimeStart));
        }
        
        if (! (is_int($retentionTimeEnd) || is_float($retentionTimeEnd))) {
            throw new \InvalidArgumentException(
                'Argument 2 must be of type int or float. Value is of type ' . gettype($retentionTimeEnd));
        }
        
        $this->retentionTimeWindow = array();
        $this->retentionTimeWindow[static::RETENTION_TIME_START] = $retentionTimeStart;
        $this->retentionTimeWindow[static::RETENTION_TIME_END] = $retentionTimeEnd;
    }
public function setRetentionTimeWindow($retentionTimeStart, $retentionTimeEnd)
    {
        if (! (is_int($retentionTimeStart) || is_float($retentionTimeStart))) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type int or float. Value is of type ' . gettype($retentionTimeStart));
        }
        
        if (! (is_int($retentionTimeEnd) || is_float($retentionTimeEnd))) {
            throw new \InvalidArgumentException(
                'Argument 2 must be of type int or float. Value is of type ' . gettype($retentionTimeEnd));
        }
        
        $this->retentionTimeWindow = array();
        $this->retentionTimeWindow[static::RETENTION_TIME_START] = $retentionTimeStart;
        $this->retentionTimeWindow[static::RETENTION_TIME_END] = $retentionTimeEnd;
    }
public function setRetentionTimeWindow ( $ retentionTimeStart , $ retentionTimeEnd ) { if ( ! ( is_int ( $ retentionTimeStart ) || is_float ( $ retentionTimeStart ) ) ) { throw new \ InvalidArgumentException ( 'Argument 1 must be of type int or float. Value is of type ' . gettype ( $ retentionTimeStart ) ) ; } if ( ! ( is_int ( $ retentionTimeEnd ) || is_float ( $ retentionTimeEnd ) ) ) { throw new \ InvalidArgumentException ( 'Argument 2 must be of type int or float. Value is of type ' . gettype ( $ retentionTimeEnd ) ) ; } $ this -> retentionTimeWindow = array ( ) ; $ this -> retentionTimeWindow [ static :: RETENTION_TIME_START ] = $ retentionTimeStart ; $ this -> retentionTimeWindow [ static :: RETENTION_TIME_END ] = $ retentionTimeEnd ; }
Sets the spectra elements retention time or retention time window

@param float $retentionTimeStart
Retention time of fragment or start of retention time window
@param float $retentionTimeEnd
End of retention time window, or null if equal to start
Sets the spectra elements retention time or retention time window