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

DeleteUserHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
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
/**
8
 * Class DeleteUserHandler
9
 */
10
class DeleteUserHandler
11
{
12
    private $userRepository;
13
14
    /**
15
     * DeleteUserHandler constructor.
16
     * @param UserRepository $userRepository
17
     */
18
    public function __construct(UserRepository $userRepository){
19
        $this->userRepository = $userRepository;
20
    }
21
22
    /**
23
     * @param DeleteUser $command
24
     */
25
    public function handle(DeleteUser $command){
26
        $this->userRepository->delete($command->user);
27
    }
28
}
29