Completed
Pull Request — master (#1)
by Jean-Baptiste
05:12
created

Guzzle::getBaseUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace CanalTP\AbstractGuzzle;
4
5
use GuzzleHttp\Psr7\Request;
6
use GuzzleHttp\Psr7\Response;
7
8
abstract class Guzzle
9
{
10
    /**
11
     * @var string
12
     */
13
    private $baseUri;
14
15
    /**
16
     * @param string $baseUrl
0 ignored issues
show
Bug introduced by
There is no parameter named $baseUrl. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
17
     */
18
    public function __construct($config)
19
    {
20
        if (!empty($config['base_uri'])) {
21
            $this->baseUri = $config['base_uri'];
22
        }
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getBaseUri()
29
    {
30
        return $this->baseUri;
31
    }
32
33
    /**
34
     * @param string $baseUri
35
     *
36
     * @return self
37
     */
38
    public function setBaseUri($baseUri)
39
    {
40
        $this->baseUri = $baseUri;
41
42
        return $this;
43
    }
44
45
    /**
46
     * @param Request $request
47
     *
48
     * @return Response
49
     */
50
    abstract public function send(Request $request);
51
}
52