Passed
Push — master ( 399339...9c419c )
by Petr
08:15
created

Translations   A

Complexity

Total Complexity 23

Size/Duplication

Total Lines 144
Duplicated Lines 0 %

Test Coverage

Coverage 78.26%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 24
c 2
b 0
f 0
dl 0
loc 144
ccs 36
cts 46
cp 0.7826
rs 10
wmc 23

23 Methods

Rating   Name   Duplication   Size   Complexity  
A flCannotProcessNode() 0 3 1
A flCannotCreateDir() 0 3 1
A flNoProcessDirSet() 0 3 1
A flCannotMoveFile() 0 3 1
A flCannotSaveFile() 0 3 1
A flNoProcessStreamSet() 0 3 1
A flCannotSeekFile() 0 3 1
A flCannotReadDir() 0 3 1
A flNoProcessNodeSet() 0 3 1
A flCannotWriteFile() 0 3 1
A flNoProcessFileSet() 0 3 1
A flCannotOpenFile() 0 3 1
A flCannotRemoveDir() 0 3 1
A flCannotCopyFile() 0 3 1
A flCannotLoadFile() 0 3 1
A flCannotGetSize() 0 3 1
A flBadMode() 0 3 1
A flNoAvailableClasses() 0 3 1
A flCannotRemoveFile() 0 3 1
A flNoDirectoryDelimiterSet() 0 3 1
A flCannotGetFilePart() 0 3 1
A flCannotCopyDir() 0 3 1
A flCannotMoveDir() 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 3
    public function flBadMode(int $mode): string
22
    {
23 3
        return 'Bad mode for file processing.';
24
    }
25
26 17
    public function flCannotLoadFile(string $fileName): string
27
    {
28 17
        return 'Cannot load wanted file.';
29
    }
30
31 10
    public function flCannotSaveFile(string $fileName): string
32
    {
33 10
        return 'Cannot save wanted file.';
34
    }
35
36
    /**
37
     * @param string $fileName
38
     * @return string
39
     * @codeCoverageIgnore failing streams
40
     */
41 2
    public function flCannotOpenFile(string $fileName): string
42
    {
43 2
        return 'Cannot open wanted file.';
44
    }
45
46
    /**
47
     * @param string $fileName
48
     * @return string
49
     * @codeCoverageIgnore failing streams
50
     */
51
    public function flCannotSeekFile(string $fileName): string
52
    {
53
        return 'Cannot write wanted file.';
54
    }
55
56
    /**
57
     * @param string $fileName
58
     * @return string
59
     * @codeCoverageIgnore failing streams
60
     */
61
    public function flCannotWriteFile(string $fileName): string
62
    {
63
        return 'Cannot write wanted file.';
64
    }
65
66
    /**
67
     * @param string $fileName
68
     * @return string
69
     * @codeCoverageIgnore failing streams
70
     */
71
    public function flCannotGetFilePart(string $fileName): string
72
    {
73
        return 'Cannot extract part of content';
74
    }
75
76
    /**
77
     * @param string $fileName
78
     * @return string
79
     * @codeCoverageIgnore failing streams
80
     */
81
    public function flCannotGetSize(string $fileName): string
82
    {
83
        return 'Cannot copy streams, cannot get file size';
84
    }
85
86 5
    public function flCannotCopyFile(string $sourceFileName, string $destFileName): string
87
    {
88 5
        return 'Cannot copy file to destination';
89
    }
90
91 2
    public function flCannotMoveFile(string $sourceFileName, string $destFileName): string
92
    {
93 2
        return 'Cannot move file to destination';
94
    }
95
96 2
    public function flCannotRemoveFile(string $fileName): string
97
    {
98 2
        return 'Cannot remove file';
99
    }
100
101 3
    public function flCannotCreateDir(string $dirName): string
102
    {
103 3
        return 'Cannot create directory';
104
    }
105
106 7
    public function flCannotReadDir(string $dirName): string
107
    {
108 7
        return 'Cannot read directory';
109
    }
110
111 3
    public function flCannotCopyDir(string $sourceDirName, string $destDirName): string
112
    {
113 3
        return 'Cannot copy directory to destination';
114
    }
115
116 3
    public function flCannotMoveDir(string $sourceDirName, string $destDirName): string
117
    {
118 3
        return 'Cannot move directory to destination';
119
    }
120
121 3
    public function flCannotRemoveDir(string $dirName): string
122
    {
123 3
        return 'Cannot remove directory';
124
    }
125
126
    /**
127
     * @return string
128
     * @codeCoverageIgnore only when path fails
129
     */
130
    public function flNoDirectoryDelimiterSet(): string
131
    {
132
        return 'You set the empty directory delimiter!';
133
    }
134
135 1
    public function flNoProcessNodeSet(): string
136
    {
137 1
        return 'No processing nodes library set!';
138
    }
139
140 1
    public function flNoProcessFileSet(): string
141
    {
142 1
        return 'No processing files library set!';
143
    }
144
145 1
    public function flNoProcessStreamSet(): string
146
    {
147 1
        return 'No processing stream library set!';
148
    }
149
150 1
    public function flNoProcessDirSet(): string
151
    {
152 1
        return 'No processing directories library set!';
153
    }
154
155 11
    public function flNoAvailableClasses(): string
156
    {
157 11
        return 'No available classes for that settings!';
158
    }
159
}
160