SensioLabs/Security/Crawler.php
public function check($lock, $format = 'json', array $headers = [])
    {
        list($headers, $body) = $this->doCheck($lock, $format, $headers);

        if (!(preg_match('/X-Alerts: (\d+)/i', $headers, $matches) || 2 == \count($matches))) {
            throw new RuntimeException('The web service did not return alerts count.');
        }

        return new Result((int) $matches[1], $body, $format);
    }
public function check($lock, $format = 'json', array $headers = [])
    {
        list($headers, $body) = $this->doCheck($lock, $format, $headers);

        if (!(preg_match('/X-Alerts: (\d+)/i', $headers, $matches) || 2 == \count($matches))) {
            throw new RuntimeException('The web service did not return alerts count.');
        }

        return new Result((int) $matches[1], $body, $format);
    }
public function check ( $ lock , $ format = 'json' , array $ headers = [ ] ) { list ( $ headers , $ body ) = $ this -> doCheck ( $ lock , $ format , $ headers ) ; if ( ! ( preg_match ( '/X-Alerts: (\d+)/i' , $ headers , $ matches ) || 2 == \ count ( $ matches ) ) ) { throw new RuntimeException ( 'The web service did not return alerts count.' ) ; } return new Result ( ( int ) $ matches [ 1 ] , $ body , $ format ) ; }
Checks a Composer lock file.

@param string $lock    The path to the composer.lock file or a string able to be opened via file_get_contents
@param string $format  The format of the result
@param array  $headers An array of headers to add for this specific HTTP request

@return Result
Checks a Composer lock file .