Passed
Push — master ( ffc9d9...c5e0f8 )
by
unknown
07:07
created

SaasClientController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurrentClient() 0 3 1
A setClientService() 0 5 1
1
<?php
2
3
namespace Fluxter\SaasProviderBundle\Controller\Abstraction;
4
5
use Fluxter\SaasProviderBundle\Service\SaasClientService;
6
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
0 ignored issues
show
Bug introduced by
The type Symfony\Bundle\Framework...e\Controller\Controller was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
abstract class SaasClientController extends Controller
9
{
10
    /** @var SaasClientService */
11
    private $clientService;
12
13
    /**
14
     * Set the value of clientService
15
     *
16
     * @return  self
17
     */
18
    public function setClientService(SaasClientService $clientService)
19
    {
20
        $this->clientService = $clientService;
21
22
        return $this;
23
    }
24
25
    protected function getCurrentClient()
26
    {
27
        return $this->clientService->getCurrent();
28
    }
29
}
30