Passed
Push — main ( 21c65b...2786e4 )
by Proyecto
08:22
created

ReadAllUsersCommandHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 4 1
A __construct() 0 3 1
1
<?php
2
3
namespace ProyectoTAU\TAU\Module\Administration\User\Application\readAll;
4
5
use ProyectoTAU\TAU\Module\Administration\User\Domain\UserRepository;
6
7
final class ReadAllUsersCommandHandler
8
{
9
    private $userRepository;
10
    //private $dataTransformer; // TODO QueryBus pending
11
12 3
    public function __construct(UserRepository $userRepository /*, DataTransformer $dataTransformer*/)
13
    {
14 3
        $this->userRepository = $userRepository;
15
        //$this->dataTransformer = $dataTransformer;
16 3
    }
17
18 3
    public function handle(ReadAllUsersCommand $command): array //| mixed
0 ignored issues
show
Unused Code introduced by
The parameter $command is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

18
    public function handle(/** @scrutinizer ignore-unused */ ReadAllUsersCommand $command): array //| mixed

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        return //$this->dataTransformer->write(
21 3
            $this->userRepository->readAll()
22
        //)->read()
23
        ;
24
    }
25
}
26