getLockInformation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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