Completed
Push — master ( efe327...dc9a9e )
by David
08:23
created

VersionBridgePlugin   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 9
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
doHandleRequest() 0 1 ?
A handleRequest() 0 4 1
1
<?php
2
3
namespace Http\Client\Common\Plugin;
4
5
use Psr\Http\Message\RequestInterface;
6
7
/**
8
 * A plugin that helps you migrate from php-http/client-common 1.x to 2.x. This
9
 * will also help you to support PHP5 at the same time you support 2.x.
10
 *
11
 * @author Tobias Nyholm <[email protected]>
12
 */
13
trait VersionBridgePlugin
14
{
15
    abstract protected function doHandleRequest(RequestInterface $request, callable $next, callable $first);
16
17
    public function handleRequest(RequestInterface $request, callable $next, callable $first)
18
    {
19
        return $this->doHandleRequest($request, $next, $first);
20
    }
21
}
22