BaseApiService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 23
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setRequest() 0 6 1
1
<?php
2
3
namespace Swm\Bundle\MailHookBundle\ApiService;
4
5
use Symfony\Component\HttpFoundation\Request;
6
7
abstract class BaseApiService implements ApiServiceInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $metaData = array();
13
14
    /**
15
     * @var Request
16
     */
17
    protected $request;
18
19
    /**
20
     * @param  Request $request
21
     * @return $this
22
     */
23
    public function setRequest(Request $request)
0 ignored issues
show
Bug introduced by
You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
24
    {
25
        $this->request = $request;
26
27
        return $this;
28
    }
29
}
30