Completed
Push — master ( edf0e8...eb9261 )
by Nikola
03:47
created

BuilderFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 16
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInstance() 0 8 2
1
<?php
2
3
namespace RunOpenCode\AbstractBuilder\Ast;
4
5
class BuilderFactory extends \PhpParser\BuilderFactory
6
{
7
    /**
8
     * @var BuilderFactory
9
     */
10
    private static $instance;
11
12
    public static function getInstance()
13
    {
14
        if (null === self::$instance) {
15
            self::$instance = new static();
16
        }
17
18
        return self::$instance;
19
    }
20
}
21