src/TracerInfo.php
protected static function setSampled($sampler)
    {
        if ($sampler === null) {
            static::$sampled = true;
            return null;
        }

        if (is_bool($sampler)) {
            static::$sampled = $sampler;
            return null;
        }

        if (!is_bool($sampler) && !($sampler instanceof Sampler)) {
            throw new \InvalidArgumentException('$sampler must be instance of Sampler or boolean');
        }

        static::$sampled = $sampler->isSampled();
        return null;
    }
protected static function setSampled($sampler)
    {
        if ($sampler === null) {
            static::$sampled = true;
            return null;
        }

        if (is_bool($sampler)) {
            static::$sampled = $sampler;
            return null;
        }

        if (!is_bool($sampler) && !($sampler instanceof Sampler)) {
            throw new \InvalidArgumentException('$sampler must be instance of Sampler or boolean');
        }

        static::$sampled = $sampler->isSampled();
        return null;
    }
protected static function setSampled ( $ sampler ) { if ( $ sampler === null ) { static :: $ sampled = true ; return null ; } if ( is_bool ( $ sampler ) ) { static :: $ sampled = $ sampler ; return null ; } if ( ! is_bool ( $ sampler ) && ! ( $ sampler instanceof Sampler ) ) { throw new \ InvalidArgumentException ( '$sampler must be instance of Sampler or boolean' ) ; } static :: $ sampled = $ sampler -> isSampled ( ) ; return null ; }
Valid and set sampled

@param $sampler Sampler|bool

@throws \InvalidArgumentException

@return null
Valid and set sampled