Completed
Push — pr33 ( 0a4bbb )
by Kamil
02:37
created

BasicLockInformationProvider::getLockInformation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
crap 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 BasicLockInformationProvider implements LockInformationProviderInterface
15
{
16
    /**
17
     * @inheritdoc
18
     */
19 134
    public function getLockInformation()
20
    {
21 134
        $pid = getmypid();
22 134
        $hostname = gethostname();
23
24 134
        $params = array();
25 134
        $params[] = $pid;
26 134
        $params[] = $hostname;
27
28 134
        return $params;
29
    }
30
}
31