Completed
Push — master ( a7c5f9...ae6cde )
by Andrii
02:34
created

AnyTarget::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * PHP Billing Library
4
 *
5
 * @link      https://github.com/hiqdev/php-billing
6
 * @package   php-billing
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\php\billing\target;
12
13
/**
14
 * @author Andrii Vasyliev <[email protected]>
15
 */
16
class AnyTarget extends AbstractTarget
17
{
18
    private static $instance;
19
20
    public function __construct()
21
    {
22
        parent::__construct(self::ANY, self::ANY);
23
    }
24
25
    public static function get(): self
26
    {
27
        if (self::$instance === null) {
28
            self::$instance = new self();
29
        }
30
31
        return self::$instance;
32
    }
33
}
34