Passed
Branch develop (e4e9af)
by BENARD
05:38
created

GameManager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A copy() 0 3 1
A maj() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Service;
4
5
use Doctrine\DBAL\Exception;
6
use VideoGamesRecords\CoreBundle\Entity\Game;
7
use VideoGamesRecords\CoreBundle\Repository\GameRepository;
8
9
class GameManager
10
{
11
    private GameRepository $gameRepository;
12
13
    public function __construct(GameRepository $gameRepository)
14
    {
15
        $this->gameRepository = $gameRepository;
16
    }
17
18
    /**
19
     * @param Game $game
20
     */
21
    public function maj(Game $game): void
22
    {
23
        $this->gameRepository->maj($game);
24
    }
25
26
    /**
27
     * @param Game $game
28
     * @throws Exception
29
     */
30
    public function copy(Game $game): void
31
    {
32
        $this->gameRepository->copy($game->getId());
33
    }
34
}
35