Completed
Push — master ( 4dd860...67b321 )
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 100%

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 4
cts 4
cp 1
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 1
    public static function getInstance()
13
    {
14 1
        if (null === self::$instance) {
15 1
            self::$instance = new static();
16
        }
17
18 1
        return self::$instance;
19
    }
20
}
21