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.
Completed
Push — master ( 611a27...a833ec )
by Olivier
01:50
created

ProvideDispatcher   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 15 2
A create() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ICanBoogie\HTTP;
13
14
/**
15
 * Basic dispatcher provider.
16
 */
17
class ProvideDispatcher
18
{
19
	private $dispatcher;
20
21
	/**
22
	 * @return RequestDispatcher
23
	 */
24
	public function __invoke()
25
	{
26
		$dispatcher = &$this->dispatcher;
27
28
		if ($dispatcher)
29
		{
30
			return $dispatcher;
31
		}
32
33
		$dispatcher = $this->create();
34
35
		new RequestDispatcher\AlterEvent($dispatcher);
36
37
		return $dispatcher;
38
	}
39
40
	protected function create()
41
	{
42
		return new RequestDispatcher;
43
	}
44
}
45