Completed
Push — feature/configure_company ( 4609f0 )
by Laurent
08:28
created

CompanyFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 16 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 Domain\Administration\Company;
15
16
use Domain\Administration\Company\Command\CreateCompany;
17
use Domain\Administration\Company\Model\Company;
18
use Domain\Common\Model\ContactUuid;
19
20
final class CompanyFactory
21
{
22
    public function create(CreateCompany $command): Company
23
    {
24
        return Company::create(
25
            ContactUuid::generate(),
26
            $command->name(),
27
            $command->address(),
28
            $command->zipCode(),
29
            $command->town(),
30
            $command->country(),
31
            $command->phone(),
32
            $command->facsimile(),
33
            $command->email(),
34
            $command->contact(),
35
            $command->gsm()
36
        );
37
    }
38
}
39