Completed
Pull Request — master (#10)
by
unknown
04:03
created

DeleteUserHandler::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
c 2
b 1
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace SumoCoders\FrameworkMultiUserBundle\Command;
4
5
use SumoCoders\FrameworkMultiUserBundle\User\UserRepository;
6
7
final class DeleteUserHandler
8
{
9
    /**
10
     * @var UserRepository
11
     */
12
    private $userRepository;
13
14
    /**
15
     * DeleteUserHandler constructor.
16
     *
17
     * @param UserRepository $userRepository
18
     */
19
    public function __construct(UserRepository $userRepository)
20
    {
21
        $this->userRepository = $userRepository;
22
    }
23
24
    /**
25
     * @param DeleteUser $command
26
     */
27
    public function handle(DeleteUser $command)
28
    {
29
        $this->userRepository->delete($command->getUser());
30
    }
31
}
32