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

SingleEventPublisher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A instance() 0 9 2
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
}