Passed
Push — master ( 5665a9...08a82c )
by Carl
03:34
created

Wallet   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 1
dl 0
loc 23
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 4 1
A get() 0 4 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:    21:27
10
 * File:    Wallet.php
11
 **/
12
13
namespace PartFire\MangoPayBundle\Services;
14
15
use PartFire\MangoPayBundle\Models\WalletQueryInterface;
16
use \PartFire\MangoPayBundle\Models\DTOs\Wallet as WalletDto;
17
18
class Wallet
19
{
20
    protected $walletQuery;
21
22
    public function __construct(WalletQueryInterface $walletQuery)
23
    {
24
        $this->walletQuery = $walletQuery;
25
    }
26
27
    /**
28
     * @param WalletDto $walletDto
29
     * @return mixed
30
     */
31
    public function create(WalletDto $walletDto)
32
    {
33
        return $this->walletQuery->create($walletDto);
34
    }
35
36
    public function get($walletId)
37
    {
38
        return $this->walletQuery->get($walletId);
39
    }
40
}
41