Passed
Push — master ( cb2d88...e8a992 )
by Petr
08:25
created

Translations   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
dl 0
loc 104
ccs 30
cts 36
cp 0.8333
rs 10
c 1
b 0
f 0
wmc 18

18 Methods

Rating   Name   Duplication   Size   Complexity  
A flCannotCreateDir() 0 3 1
A flCannotMoveFile() 0 3 1
A flCannotSaveFile() 0 3 1
A flCannotReadDir() 0 3 1
A flCannotProcessNode() 0 3 1
A flCannotCopyFile() 0 3 1
A flCannotLoadFile() 0 3 1
A flCannotRemoveDir() 0 3 1
A flCannotRemoveFile() 0 3 1
A flCannotMoveDir() 0 3 1
A flCannotCopyDir() 0 3 1
A flCannotGetSize() 0 3 1
A flCannotGetFilePart() 0 3 1
A flNoProcessDirSet() 0 3 1
A flNoProcessNodeSet() 0 3 1
A flNoProcessFileSet() 0 3 1
A flNoAvailableClasses() 0 3 1
A flNoDirectoryDelimiterSet() 0 3 1
1
<?php
2
3
namespace kalanis\kw_files;
4
5
6
use kalanis\kw_files\Interfaces\IFLTranslations;
7
8
9
/**
10
 * Class Translations
11
 * @package kalanis\kw_files
12
 * Translations
13
 */
14
class Translations implements IFLTranslations
15
{
16 4
    public function flCannotProcessNode(string $name): string
17
    {
18 4
        return 'Cannot process wanted path.';
19
    }
20
21 6
    public function flCannotLoadFile(string $fileName): string
22
    {
23 6
        return 'Cannot load wanted file.';
24
    }
25
26 3
    public function flCannotSaveFile(string $fileName): string
27
    {
28 3
        return 'Cannot save wanted file.';
29
    }
30
31
    /**
32
     * @param string $fileName
33
     * @return string
34
     * @codeCoverageIgnore failing streams
35
     */
36
    public function flCannotGetFilePart(string $fileName): string
37
    {
38
        return 'Cannot extract part of content';
39
    }
40
41
    /**
42
     * @param string $fileName
43
     * @return string
44
     * @codeCoverageIgnore failing streams
45
     */
46
    public function flCannotGetSize(string $fileName): string
47
    {
48
        return 'Cannot copy streams, cannot get file size';
49
    }
50
51 3
    public function flCannotCopyFile(string $sourceFileName, string $destFileName): string
52
    {
53 3
        return 'Cannot copy file to destination';
54
    }
55
56 1
    public function flCannotMoveFile(string $sourceFileName, string $destFileName): string
57
    {
58 1
        return 'Cannot move file to destination';
59
    }
60
61 2
    public function flCannotRemoveFile(string $fileName): string
62
    {
63 2
        return 'Cannot remove file';
64
    }
65
66 2
    public function flCannotCreateDir(string $dirName): string
67
    {
68 2
        return 'Cannot create directory';
69
    }
70
71 5
    public function flCannotReadDir(string $dirName): string
72
    {
73 5
        return 'Cannot read directory';
74
    }
75
76 2
    public function flCannotCopyDir(string $sourceDirName, string $destDirName): string
77
    {
78 2
        return 'Cannot copy directory to destination';
79
    }
80
81 2
    public function flCannotMoveDir(string $sourceDirName, string $destDirName): string
82
    {
83 2
        return 'Cannot move directory to destination';
84
    }
85
86 2
    public function flCannotRemoveDir(string $dirName): string
87
    {
88 2
        return 'Cannot remove directory';
89
    }
90
91
    /**
92
     * @return string
93
     * @codeCoverageIgnore only when path fails
94
     */
95
    public function flNoDirectoryDelimiterSet(): string
96
    {
97
        return 'You set the empty directory delimiter!';
98
    }
99
100 1
    public function flNoProcessNodeSet(): string
101
    {
102 1
        return 'No processing nodes library set!';
103
    }
104
105 1
    public function flNoProcessFileSet(): string
106
    {
107 1
        return 'No processing files library set!';
108
    }
109
110 1
    public function flNoProcessDirSet(): string
111
    {
112 1
        return 'No processing directories library set!';
113
    }
114
115 11
    public function flNoAvailableClasses(): string
116
    {
117 11
        return 'No available classes for that settings!';
118
    }
119
}
120