Passed
Push — main ( 7dcca1...e70bce )
by Daniel
04:22
created

UserDeleter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 2
c 1
b 0
f 0
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
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 readonly class UserDeleter implements UserDeleterInterface
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 13 at column 6
Loading history...
14
{
15 1
    public function __construct(
16
        private UserRepositoryInterface $userRepository,
17
    ) {
18 1
    }
19
20 1
    public function delete(UserInterface $user): void
21
    {
22 1
        $this->userRepository->delete($user);
23
    }
24
}
25