AbstractLocation   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 33.33%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 57
ccs 3
cts 9
cp 0.3333
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A before() 0 7 1
A after() 0 7 1
A visit() 0 7 1
1
<?php
2
namespace GuzzleHttp\Command\Guzzle\ResponseLocation;
3
4
use GuzzleHttp\Command\Guzzle\Parameter;
5
use GuzzleHttp\Command\ResultInterface;
6
use Psr\Http\Message\ResponseInterface;
7
8
/**
9
 * Class AbstractLocation
10
 *
11
 * @package GuzzleHttp\Command\Guzzle\ResponseLocation
12
 */
13
abstract class AbstractLocation implements ResponseLocationInterface
14
{
15
    /** @var string $locationName */
16
    protected $locationName;
17
18
    /**
19
     * Set the name of the location
20
     *
21
     * @param $locationName
22
     */
23 4
    public function __construct($locationName)
24
    {
25 4
        $this->locationName = $locationName;
26 4
    }
27
28
    /**
29
     * @param ResultInterface $result
30
     * @param ResponseInterface $response
31
     * @param Parameter $model
32
     * @return ResultInterface
33
     */
34
    public function before(
35
        ResultInterface $result,
36
        ResponseInterface $response,
37
        Parameter $model
38
    ) {
39
        return $result;
40
    }
41
42
    /**
43
     * @param ResultInterface $result
44
     * @param ResponseInterface $response
45
     * @param Parameter $model
46
     * @return ResultInterface
47
     */
48
    public function after(
49
        ResultInterface $result,
50
        ResponseInterface $response,
51
        Parameter $model
52
    ) {
53
        return $result;
54
    }
55
56
    /**
57
     * @param ResultInterface $result
58
     * @param ResponseInterface $response
59
     * @param Parameter $param
60
     * @return ResultInterface
61
     */
62
    public function visit(
63
        ResultInterface $result,
64
        ResponseInterface $response,
65
        Parameter $param
66
    ) {
67
        return $result;
68
    }
69
}
70