for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Mailgun\HttpClient\Plugin;
use Http\Client\Common\Plugin;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\UriInterface;
/**
* Replaces a URI with a new one. Good for debugging.
* @author Tobias Nyholm <[email protected]>
final class ReplaceUriPlugin implements Plugin
{
use Plugin\VersionBridgePlugin;
* @var UriInterface
private $uri;
public function __construct(UriInterface $uri)
$this->uri = $uri;
}
public function doHandleRequest(RequestInterface $request, callable $next, callable $first)
$first
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$request = $request->withUri($this->uri);
return $next($request);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.