Completed
Pull Request — master (#19)
by Sergey
03:32
created

Provider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 37
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRequest() 0 4 1
A getResponse() 0 4 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Providers;
4
5
use seregazhuk\PinterestBot\Api\Request;
6
use seregazhuk\PinterestBot\Api\Response;
7
use seregazhuk\PinterestBot\Interfaces\RequestInterface;
8
use seregazhuk\PinterestBot\Interfaces\ResponseInterface;
9
use seregazhuk\PinterestBot\Helpers\Providers\ProviderHelper;
10
11
/**
12
 * Class Provider
13
 *
14
 * @package seregazhuk\PinterestBot\Interfaces
15
 */
16
class Provider
17
{
18
    use ProviderHelper;
19
    /**
20
     * Instance of the API RequestInterface
21
     *
22
     * @var RequestInterface
23
     */
24
    protected $request;
25
    protected $response;
26
27
    /**
28
     * @param  RequestInterface $request
29
     * @param ResponseInterface $response
30
     */
31
    public function __construct(RequestInterface $request, ResponseInterface $response)
32
    {
33
        $this->request = $request;
34
        $this->response = $response;
35
    }
36
37
    /**
38
     * @return Request
39
     */
40
    protected function getRequest()
41
    {
42
        return $this->request;
43
    }
44
45
    /**
46
     * @return Response
47
     */
48
    protected function getResponse()
49
    {
50
        return $this->response;
51
    }
52
}