src/Core/Spectra/IonTrait.php
public function setIntensity($intensity)
    {
        if (! (is_int($intensity) || is_float($intensity))) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type int or float. Value is of type ' . gettype($intensity));
        }
        
        $this->intensity = $intensity;
    }
public function setIntensity($intensity)
    {
        if (! (is_int($intensity) || is_float($intensity))) {
            throw new \InvalidArgumentException(
                'Argument 1 must be of type int or float. Value is of type ' . gettype($intensity));
        }
        
        $this->intensity = $intensity;
    }
public function setIntensity ( $ intensity ) { if ( ! ( is_int ( $ intensity ) || is_float ( $ intensity ) ) ) { throw new \ InvalidArgumentException ( 'Argument 1 must be of type int or float. Value is of type ' . gettype ( $ intensity ) ) ; } $ this -> intensity = $ intensity ; }
Sets the intensity value for this ion

@param float $intensity
The intensity value to set
@throws \InvalidArgumentException If the intensity is not of type float
Sets the intensity value for this ion