MCPcopy Create free account
hub / github.com/Rello/analytics / parseDownloadCount

Method parseDownloadCount

lib/Datasource/Github.php:343–350  ·  view source on GitHub ↗
(string $value)

Source from the content-addressed store, hash-verified

341 }
342
343 private function parseDownloadCount(string $value): int {
344 $digits = preg_replace('/\D+/', '', $value);
345 if ($digits === null || $digits === '') {
346 return 0;
347 }
348
349 return (int)$digits;
350 }
351
352 private function getRawData($url, $option) {
353 $response = $this->httpClient->request($url, 'GET', $this->buildHtmlRequestHeaders($option));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected