Completed
Push — master ( 9b376c...787c0a )
by Jean C.
02:03
created

src/Moip.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Artesaos\Moip;
4
5
use Moip\Moip as Api;
6
7
/**
8
 * Class Moip.
9
 *
10
 * @package Artesaos\Moip
11
 */
12
class Moip
13
{
14
    /**
15
     * Class Moip sdk.
16
     *
17
     * @var \Moip\Moip
18
     **/
19
    private $moip;
20
21
    /**
22
     * Moip constructor.
23
     *
24
     * @param \Moip\Moip $api
25
     */
26
    function __construct(Api $api)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
27
    {
28
        $this->moip = $api;
29
30
        return $this;
0 ignored issues
show
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
31
    }
32
33
    /**
34
     * Return a intance of package.
35
     *
36
     * @return \Moip\Moip
37
     */
38
    public function getApi()
39
    {
40
        return $this->moip;
41
    }
42
43
    /**
44
     * Start Moip sdk.
45
     *
46
     * @deprecated
47
     */
48
    public function start()
49
    {
50
        return $this;
51
    }
52
53
    /**
54
     * Create a new Customer instance.
55
     *
56
     * @return \Moip\Resource\Customer
57
     */
58
    public function customers()
59
    {
60
        return $this->moip->customers();
61
    }
62
63
    /**
64
     * Create a new Entry instance.
65
     *
66
     * @return \Moip\Resource\Entry
67
     */
68
    public function entries()
69
    {
70
        return $this->moip->entries();
71
    }
72
73
    /**
74
     * Create a new Order instance.
75
     *
76
     * @return \Moip\Resource\Orders
77
     */
78
    public function orders()
79
    {
80
        return $this->moip->orders();
81
    }
82
83
    /**
84
     * Create a new Payment instance.
85
     *
86
     * @return \Moip\Resource\Payment
87
     */
88
    public function payments()
89
    {
90
        return $this->moip->payments();
91
    }
92
93
    /**
94
     * Create a new Multiorders instance.
95
     *
96
     * @return \Moip\Resource\Multiorders
97
     */
98
    public function multiorders()
99
    {
100
        return $this->moip->multiorders();
101
    }
102
}
103