lib/WebhookSignature.php
private static function getTimestamp($header)
    {
        $items = explode(",", $header);

        foreach ($items as $item) {
            $itemParts = explode("=", $item, 2);
            if ($itemParts[0] == "t") {
                if (!is_numeric($itemParts[1])) {
                    return -1;
                }
                return intval($itemParts[1]);
            }
        }

        return -1;
    }
private static function getTimestamp($header)
    {
        $items = explode(",", $header);

        foreach ($items as $item) {
            $itemParts = explode("=", $item, 2);
            if ($itemParts[0] == "t") {
                if (!is_numeric($itemParts[1])) {
                    return -1;
                }
                return intval($itemParts[1]);
            }
        }

        return -1;
    }
private static function getTimestamp ( $ header ) { $ items = explode ( "," , $ header ) ; foreach ( $ items as $ item ) { $ itemParts = explode ( "=" , $ item , 2 ) ; if ( $ itemParts [ 0 ] == "t" ) { if ( ! is_numeric ( $ itemParts [ 1 ] ) ) { return - 1 ; } return intval ( $ itemParts [ 1 ] ) ; } } return - 1 ; }
Extracts the timestamp in a signature header.

@param string $header the signature header
@return int the timestamp contained in the header, or -1 if no valid
timestamp is found
Extracts the timestamp in a signature header .