Completed
Push — master ( 7f572e...bf04a1 )
by Benedikt
02:39
created

DeletionService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 31
c 0
b 0
f 0
rs 10
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A deletePlayer() 0 4 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Created by PhpStorm.
5
 * User: benedikt
6
 * Date: 2/2/18
7
 * Time: 5:15 PM
8
 */
9
10
namespace Tfboe\FmLib\Service;
11
12
13
use Doctrine\ORM\EntityManagerInterface;
14
use Tfboe\FmLib\Entity\PlayerInterface;
15
16
/**
17
 * Class DeletionService
18
 * @package App\Services
19
 */
20
class DeletionService implements DeletionServiceInterface
21
{
22
//<editor-fold desc="Fields">
23
  /**
24
   * @var EntityManagerInterface
25
   */
26
  private $entityManager;
27
//</editor-fold desc="Fields">
28
29
//<editor-fold desc="Constructor">
30
  /**
31
   * DeletionService constructor.
32
   * @param EntityManagerInterface $entityManager
33
   */
34
  public function __construct(EntityManagerInterface $entityManager)
35
  {
36
    $this->entityManager = $entityManager;
37
  }
38
//</editor-fold desc="Constructor">
39
40
//<editor-fold desc="Public Methods">
41
  /**
42
   * @inheritDoc
43
   */
44
  public function deletePlayer(PlayerInterface $player): void
45
  {
46
    $this->entityManager->remove($player);
47
  }
48
49
  //</editor-fold desc="Public Methods">
50
}