Completed
Pull Request — master (#6)
by Jimmy K. Oak
01:59
created

SingleEventPublisher::instance()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
3
namespace JimmyOak\Event;
4
5
class SingleEventPublisher extends EventPublisher
6
{
7
    public static function instance()
8
    {
9
        static $instance = null;
10
        if (null === $instance) {
11
            $instance = new self();
12
        }
13
14
        return $instance;
15
    }
16
}