for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Metfan\RabbitSetup\Container;
use Metfan\RabbitSetup\Factory\CurlClientFactory;
use Metfan\RabbitSetup\Http\ClientPool;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
/**
* Add definition of CurlClientFactory et ClientPool to container
*
* @author Ulrich
* @package Metfan\RabbitSetup\Container
*/
class HttpClientProvider implements ServiceProviderInterface
{
public function register(Container $container)
$container['curl_client_factory'] = function($c) {
$c
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return new CurlClientFactory();
};
$container['http_client_pool'] = function($c) {
return new ClientPool($c['curl_client_factory']);
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.