Completed
Pull Request — master (#10)
by
unknown
08:37
created

DeleteUserHandler::handle()   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
class DeleteUserHandler
8
{
9
    private $userRepository;
10
11
    /**
12
     * DeleteUserHandler constructor.
13
     *
14
     * @param UserRepository $userRepository
15
     */
16
    public function __construct(UserRepository $userRepository)
17
    {
18
        $this->userRepository = $userRepository;
19
    }
20
21
    /**
22
     * @param DeleteUser $command
23
     */
24
    public function handle(DeleteUser $command)
25
    {
26
        $this->userRepository->delete($command->user);
27
    }
28
}
29