ResolvedHostnameLockInformationProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLockInformation() 0 7 1
1
<?php
2
/**
3
 * This file is part of ninja-mutex.
4
 *
5
 * (C) Kamil Dziedzic <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NinjaMutex\Lock;
12
13
14
class ResolvedHostnameLockInformationProvider extends BasicLockInformationProvider
15
{
16
    /**
17
     * Adds resolved host IP to the provided information
18
     * (WARNING! Using DNS queries at runtime may introduce significant delays to script execution, use with caution!)
19
     * @return array
20
     */
21
    public function getLockInformation()
22
    {
23
        $params = parent::getLockInformation();
24
        $params[] = gethostbyname(gethostname());
25
26
        return $params;
27
    }
28
}
29