HostnameLockHolder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_lock_holder() 0 7 2
1
<?php
2
3
namespace Ingenerator\RunSingle;
4
5
6
class HostnameLockHolder implements LockHolder {
7
8
    protected $lock_holder;
9
10
    public function get_lock_holder()
11
    {
12
        if(!$this->lock_holder) {
13
            $this->lock_holder = \gethostname();
14
        }
15
        return $this->lock_holder;
16
    }
17
18
}
19