src/Bayer/DataDogClient/Series/Metric.php
public function addPoint(array $point) {
        // Add timestamp if non provided
        if (!isset($point[1])) {
            $point = array(time(), $point[0]);
        }

        if (!is_integer($point[0])) {
            throw new InvalidPointException('Timestamp must be an integer');
        }

        if (!is_int($point[1]) && !is_float($point[1])) {
            throw new InvalidPointException('Value must be integer or float');
        }

        $this->points[] = $point;

        return $this;
    }
public function addPoint(array $point) {
        // Add timestamp if non provided
        if (!isset($point[1])) {
            $point = array(time(), $point[0]);
        }

        if (!is_integer($point[0])) {
            throw new InvalidPointException('Timestamp must be an integer');
        }

        if (!is_int($point[1]) && !is_float($point[1])) {
            throw new InvalidPointException('Value must be integer or float');
        }

        $this->points[] = $point;

        return $this;
    }
public function addPoint ( array $ point ) { // Add timestamp if non provided if ( ! isset ( $ point [ 1 ] ) ) { $ point = array ( time ( ) , $ point [ 0 ] ) ; } if ( ! is_integer ( $ point [ 0 ] ) ) { throw new InvalidPointException ( 'Timestamp must be an integer' ) ; } if ( ! is_int ( $ point [ 1 ] ) && ! is_float ( $ point [ 1 ] ) ) { throw new InvalidPointException ( 'Value must be integer or float' ) ; } $ this -> points [ ] = $ point ; return $ this ; }
Add a new measure point to the metric.

A point consists of an optional timestamp and a numeric value. If
no timestamp is specified, the current timestamp will be used. Order
matters. If a timestamp is specified, it should be the first value.

Examples:
Simple point:   array(20)
With timestamp: array(1234567, 20)

@param array $point
@throws InvalidPointException

@return Metric
Add a new measure point to the metric .