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

ReadAllUsersCommandHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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