Passed
Push — master ( bf075b...6deca2 )
by Petr
07:21
created

Translations::iklCannotOpenFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace kalanis\kw_locks;
4
5
6
use kalanis\kw_locks\Interfaces\IKLTranslations;
7
8
9
/**
10
 * Class Translations
11
 * @package kalanis\kw_locks
12
 */
13
class Translations implements IKLTranslations
14
{
15 2
    public function iklLockedByOther(): string
16
    {
17 2
        return 'Locked by another!';
18
    }
19
20 9
    public function iklProblemWithStorage(): string
21
    {
22 9
        return 'Problem with storage';
23
    }
24
25
    /**
26
     * @param string $lockFilename
27
     * @return string
28
     * @codeCoverageIgnore
29
     */
30
    public function iklCannotUseFile(string $lockFilename): string
31
    {
32
        return 'Cannot use: ' . $lockFilename . ' as lock file. Path is not writable.';
33
    }
34
35
    /**
36
     * @param string $path
37
     * @return string
38
     * @codeCoverageIgnore
39
     */
40
    public function iklCannotUsePath(string $path): string
41
    {
42
        return 'Cannot use: ' . $path . ' to lock. Path not found and cannot be created.';
43
    }
44
45
    /**
46
     * @param string $lockFilename
47
     * @return string
48
     * @codeCoverageIgnore
49
     */
50
    public function iklCannotOpenFile(string $lockFilename): string
51
    {
52
        return 'Could not open lock file: '. $lockFilename;
53
    }
54
55
    /**
56
     * @return string
57
     * @codeCoverageIgnore
58
     */
59
    public function iklCannotUseOS(): string
60
    {
61
        return 'Unusable OS. Cannot use external programs to determine process ID.';
62
    }
63
}
64