GitHub Access Token became invalid

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.

Search   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A service() 0 12 4
1
<?php namespace zServices\Sintegra;
2
3
use zServices\Miscellany\Exceptions\InvalidService;
4
use zServices\Miscellany\Interfaces\ServiceInterface;
5
6
/**
7
* Providencias os serviços e configurações
8
*/
9
class Search
10
{
11
	/**
12
	 * [$services description]
13
	 * @var [type]
14
	 */
15
	private $services = [
16
		'SP' => \zServices\Sintegra\Services\Portais\SP\Service::class,
17
	];
18
19
	/**
20
	 * [$service description]
21
	 * @var [type]
22
	 */
23
	private $service;
24
25
	/**
26
	 * [service description]
27
	 * @param string $service
28
	 * @return [type] [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
29
	 */
30
	public function service($service)
31
	{
32
		if (array_key_exists($service, $this->services) && class_exists($this->services[$service])) {
33
			$service = new $this->services[$service];
34
35
			if ($service instanceof ServiceInterface) {
36
				return $this->service = $service;
37
			}
38
		}
39
40
		throw new InvalidService("Portal $service invalid", 1);
41
	}
42
}