Passed
Push — main ( ad42a0...8a363b )
by Daniel
05:42
created

UserDeleter::delete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Uxmp\Core\Component\User;
6
7
use Uxmp\Core\Orm\Model\UserInterface;
8
use Uxmp\Core\Orm\Repository\UserRepositoryInterface;
9
10
/**
11
 * Deletes a user including all dependencies and meta data
12
 */
13
final class UserDeleter implements UserDeleterInterface
14
{
15 1
    public function __construct(
16
        private readonly UserRepositoryInterface $userRepository,
17
    ) {
18
    }
19
20 1
    public function delete(UserInterface $user): void
21
    {
22 1
        $this->userRepository->delete($user);
23
    }
24
}
25