It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
21
{
22
/**
23
* @var \Ups\Rate
24
*/
25
private $upsRate;
26
27
/**
28
* Shipping constructor.
29
*
30
* @param Rate $upsRate
31
*/
32
public function __construct(Rate $upsRate)
33
{
34
$this->upsRate = $upsRate;
35
}
36
37
/**
38
* @param $rateRequest
39
*
40
* @throws Exception
41
*
42
* @return RateRequest
43
*/
44
public function shopRates($rateRequest)
45
{
46
$this->upsRate->shopRates($rateRequest);
47
}
48
49
/**
50
* @param $rateRequest
51
*
52
* @throws Exception
53
*
54
* @return RateRequest
55
*/
56
public function getRate($rateRequest)
57
{
58
return $this->upsRate->getRate($rateRequest);
59
}
60
61
/**
62
* @return RequestInterface
63
*/
64
public function getRequest()
65
{
66
return $this->upsRate->getRequest();
67
}
68
69
/**
70
* @param RequestInterface $request
71
*
72
* @return $this
73
*/
74
public function setRequest(RequestInterface $request)
75
{
76
$this->upsRate->setRequest($request);
77
78
return $this;
79
}
80
81
/**
82
* @return ResponseInterface
83
*/
84
public function getResponse()
85
{
86
return $this->upsRate->getResponse();
87
}
88
89
/**
90
* @param ResponseInterface $response
91
*
92
* @return $this
93
*/
94
public function setResponse(ResponseInterface $response)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.