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

RankingRepository::remove()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Asylamba\Modules\Atlas\Repository;
4
5
use Asylamba\Classes\Entity\AbstractRepository;
6
7
class RankingRepository extends AbstractRepository
8
{
9
	public function hasBeenAlreadyProcessed($isPlayer, $isFaction)
10
	{
11
		$statement = $this->connection->prepare(
12
			'SELECT * FROM ranking WHERE player = :is_player AND faction = :is_faction AND dRanking >= CURDATE()'
13
		);
14
		$statement->execute([
15
			'is_player' => (int) $isPlayer,
16
			'is_faction' => (int) $isFaction
17
		]);
18
		return $statement->rowCount() > 0;
19
	}
20
	
21
	public function insert($ranking)
22
	{
23
		# create a new ranking
24
		$qr = $this->connection->prepare('INSERT INTO ranking(dRanking, player, faction) VALUES (:created_at, :is_player, :is_faction)');
25
		$qr->execute([
26
			'created_at' => $ranking->getCreatedAt(),
27
			'is_player' => (int) $ranking->getIsPlayer(),
28
			'is_faction' => (int) $ranking->getIsFaction()
29
		]);
30
31
		$ranking->setId($this->connection->lastInsertId());
32
	}
33
	
34
	public function update($ranking)
35
	{
36
		
37
	}
38
	
39
	public function remove($ranking)
40
	{
41
		
42
	}
43
}