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 ( 11c0a1...856a6b )
by Jacky
34s
created

FactionRankingRepository::getRoutesIncome()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 20
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace Asylamba\Modules\Atlas\Repository;
4
5
use Asylamba\Classes\Entity\AbstractRepository;
6
7
use Asylamba\Modules\Athena\Model\CommercialRoute;
8
use Asylamba\Modules\Demeter\Model\Color;
9
10
class FactionRankingRepository extends AbstractRepository
11
{
12
	public function getRoutesIncome(Color $faction)
13
	{
14
		$qr = $this->connection->prepare(
15
			'SELECT COUNT(cr.id) AS nb,
16
				SUM(cr.income) AS income
17
			FROM commercialRoute AS cr
18
			LEFT JOIN orbitalBase AS ob1
19
				ON cr.rOrbitalBase = ob1.rPlace
20
				LEFT JOIN player AS pl1
21
					ON ob1.rPlayer = pl1.id
22
			LEFT JOIN orbitalBase AS ob2
23
				ON cr.rOrbitalBaseLinked = ob2.rPlace
24
				LEFT JOIN player AS pl2
25
					ON ob2.rPlayer = pl2.id
26
			WHERE (pl1.rColor = ? OR pl2.rColor = ?) AND cr.statement = ?'
27
		);
28
		# hint : en fait ça compte qu'une fois une route interfaction, mais chut
29
		$qr->execute([$faction->getId(), $faction->getId(), CommercialRoute::ACTIVE]);
30
		return $qr->fetch();
31
	}
32
	
33
	public function insert($ranking)
34
	{
35
		
36
	}
37
	
38
	public function update($ranking)
39
	{
40
		
41
	}
42
	
43
	public function remove($ranking)
44
	{
45
		
46
	}
47
}