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

Method parseDownloadCount

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

Source from the content-addressed store, hash-verified

354 }
355
356 private function parseDownloadCount(string $value): int {
357 $digits = preg_replace('/\D+/', '', $value);
358 if ($digits === null || $digits === '') {
359 return 0;
360 }
361
362 return (int)$digits;
363 }
364
365 private function getRawData($url, $option) {
366 $response = $this->httpClient->request($url, 'GET', $this->buildHtmlRequestHeaders($option));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected