AbstractLocation::visit()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 2
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