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

GameManager::copy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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