Completed
Push — master ( e5dc16...8abc4c )
by
unknown
01:52
created

Merchant::createInstance()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
3
namespace Padosoft\AffiliateNetwork;
4
5
/**
6
 * Class Merchant
7
 * @package Padosoft\AffiliateNetwork
8
 */
9
class Merchant
10
{
11
    /**
12
     * @var int
13
     */
14
    public $merchant_ID = 0;
15
16
    /**
17
     * @var string
18
     */
19
    public $name = '';
20
21
    /**
22
     * @method createInstance
23
     * @return obj istance
24
     */
25
    public static function createInstance()
26
    {
27
        $obj = null;
28
        try {
29
            $obj = new Merchant();
30
        } catch (\Exception $e) {
31
            throw new \Exception('Error creating instance Merchant - ' . $e->getMessage());
32
        }
33
        return $obj;
34
    }
35
36
}
37