User::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Created by Carl Owens ([email protected])
4
 * Company: PartFire Ltd (www.partfire.co.uk)
5
 * Copyright © 2016 PartFire Ltd. All rights reserved.
6
 *
7
 * User:    Carl Owens
8
 * Date:    28/11/2016
9
 * Time:    16:07
10
 * File:    User.php
11
 **/
12
13
namespace PartFire\MangoPayBundle\Services;
14
15
use PartFire\MangoPayBundle\Models\DTOs\UserBase as UserDto;
16
use PartFire\MangoPayBundle\Models\DTOs\UserLegal;
17
use PartFire\MangoPayBundle\Models\DTOs\UserNatural;
18
use PartFire\MangoPayBundle\Models\UserQueryInterface;
19
20
class User
21
{
22
    /**
23
     * @var UserQueryInterface
24
     */
25
    private $userQuery;
26
27
    public function __construct(UserQueryInterface $userQuery)
28
    {
29
        $this->userQuery = $userQuery;
30
    }
31
32
    /**
33
     * @param UserDto $user
34
     * @return mixed
35
     */
36
    public function createNatural(UserNatural $user)
37
    {
38
        return $this->userQuery->createNatural($user);
39
    }
40
41
    public function createLegal(UserLegal $user)
42
    {
43
        return $this->userQuery->createLegal($user);
44
    }
45
}
46