CreateSettings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the G.L.S.R. Apps package.
7
 *
8
 * (c) Dev-Int Création <[email protected]>.
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Company\Application\Settings\Factory;
15
16
use Company\Domain\Model\Settings;
17
use Core\Domain\Common\Command\CommandInterface;
18
19
class CreateSettings
20
{
21
    public function create(CommandInterface $command): Settings
22
    {
23
        return Settings::create(
24
            $command->uuid(),
0 ignored issues
show
Bug introduced by
The method uuid() does not exist on Core\Domain\Common\Command\CommandInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Administration\Domain\Su...\Command\CreateSupplier. Are you sure you never get one of those? ( Ignorable by Annotation )

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

24
            $command->/** @scrutinizer ignore-call */ 
25
                      uuid(),
Loading history...
25
            $command->locale(),
0 ignored issues
show
Bug introduced by
The method locale() does not exist on Core\Domain\Common\Command\CommandInterface. It seems like you code against a sub-type of Core\Domain\Common\Command\CommandInterface such as Company\Application\Settings\Command\EditSettings or Company\Application\Sett...mmand\ConfigureSettings. ( Ignorable by Annotation )

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

25
            $command->/** @scrutinizer ignore-call */ 
26
                      locale(),
Loading history...
26
            $command->currency()
0 ignored issues
show
Bug introduced by
The method currency() does not exist on Core\Domain\Common\Command\CommandInterface. It seems like you code against a sub-type of Core\Domain\Common\Command\CommandInterface such as Company\Application\Settings\Command\EditSettings or Company\Application\Sett...mmand\ConfigureSettings. ( Ignorable by Annotation )

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

26
            $command->/** @scrutinizer ignore-call */ 
27
                      currency()
Loading history...
27
        );
28
    }
29
}
30