for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Vanbrabantf\NpmStatFetcher\Repositories;
use GuzzleHttp\Client;
class NpmRegistryRepository
{
/**
* @var Client
*/
private $client;
public function __construct(Client $client)
$this->client = $client;
}
* @param string $path
* @return string
public function getResourceByPath(string $path): string
$resource = $this->client->get($path);
return $resource->getBody()->getContents();