Passed
Push — master ( 1b6475...610123 )
by Petr
10:18
created

Translations   A

Complexity

Total Complexity 23

Size/Duplication

Total Lines 139
Duplicated Lines 0 %

Test Coverage

Coverage 91.3%

Importance

Changes 0
Metric Value
eloc 24
dl 0
loc 139
ccs 42
cts 46
cp 0.913
rs 10
c 0
b 0
f 0
wmc 23

23 Methods

Rating   Name   Duplication   Size   Complexity  
A uppDriveFileNotContinuous() 0 3 1
A uppReadTooEarly() 0 3 1
A uppDriveFileVariantNotSet() 0 3 1
A uppKeyVariantNotSet() 0 3 1
A uppCannotRemoveData() 0 3 1
A uppDriveFileVariantIsWrong() 0 3 1
A uppSentNameIsEmpty() 0 3 1
A uppSegmentNotUploadedYet() 0 3 1
A uppCannotOpenFile() 0 3 1
A uppKeyVariantIsWrong() 0 3 1
A uppTargetDirIsEmpty() 0 3 1
A uppSegmentOutOfBounds() 0 3 1
A uppSharedKeyIsEmpty() 0 3 1
A uppDriveFileAlreadyExists() 0 3 1
A uppDriveFileCannotRead() 0 3 1
A uppDriveFileCannotWrite() 0 3 1
A uppDriveFileCannotRemove() 0 3 1
A uppUploadNameIsEmpty() 0 3 1
A uppSharedKeyIsInvalid() 0 3 1
A uppCannotTruncateFile() 0 3 1
A uppCannotReadFile() 0 3 1
A uppCannotSeekFile() 0 3 1
A uppCannotWriteFile() 0 3 1
1
<?php
2
3
namespace kalanis\UploadPerPartes\Uploader;
4
5
6
use kalanis\UploadPerPartes\Interfaces\IUPPTranslations;
7
8
9
/**
10
 * Class Translations
11
 * @package kalanis\UploadPerPartes
12
 * Return translated quotes from backend
13
 * - necessary due many translation systems through web
14
 * For work extends this class and pass extension into your project
15
 */
16
class Translations implements IUPPTranslations
17
{
18 2
    public function uppSentNameIsEmpty(): string
19
    {
20 2
        return 'SENT FILE NAME IS EMPTY';
21
    }
22
23 1
    public function uppUploadNameIsEmpty(): string
24
    {
25 1
        return 'UPLOAD FILE NAME IS EMPTY';
26
    }
27
28 1
    public function uppSharedKeyIsEmpty(): string
29
    {
30 1
        return 'SHARED KEY IS EMPTY';
31
    }
32
33 1
    public function uppSharedKeyIsInvalid(): string
34
    {
35 1
        return 'SHARED KEY IS INVALID';
36
    }
37
38 1
    public function uppKeyVariantNotSet(): string
39
    {
40 1
        return 'KEY VARIANT NOT SET';
41
    }
42
43 1
    public function uppKeyVariantIsWrong(string $className): string
44
    {
45 1
        return 'KEY VARIANT IS WRONG';
46
    }
47
48 1
    public function uppTargetDirIsEmpty(): string
49
    {
50 1
        return 'TARGET DIR IS NOT SET';
51
    }
52
53 3
    public function uppDriveFileAlreadyExists(string $driveFile): string
54
    {
55 3
        return 'DRIVEFILE ALREADY EXISTS';
56
    }
57
58 1
    public function uppDriveFileNotContinuous(string $driveFile): string
59
    {
60 1
        return 'DRIVEFILE IS NOT CONTINUOUS';
61
    }
62
63 3
    public function uppDriveFileCannotRemove(string $key): string
64
    {
65 3
        return 'DRIVEFILE CANNOT BE REMOVED';
66
    }
67
68 1
    public function uppDriveFileVariantNotSet(): string
69
    {
70 1
        return 'DRIVEFILE VARIANT NOT SET';
71
    }
72
73 1
    public function uppDriveFileVariantIsWrong(string $className): string
74
    {
75 1
        return 'DRIVEFILE VARIANT IS WRONG';
76
    }
77
78 6
    public function uppDriveFileCannotRead(string $key): string
79
    {
80 6
        return 'CANNOT READ DRIVEFILE';
81
    }
82
83 3
    public function uppDriveFileCannotWrite(string $key): string
84
    {
85 3
        return 'CANNOT WRITE DRIVEFILE';
86
    }
87
88 1
    public function uppCannotRemoveData(string $location): string
89
    {
90 1
        return 'CANNOT REMOVE DATA';
91
    }
92
93 2
    public function uppReadTooEarly(string $key): string
94
    {
95 2
        return 'READ TOO EARLY';
96
    }
97
98 2
    public function uppCannotOpenFile(string $location): string
99
    {
100 2
        return 'CANNOT OPEN FILE';
101
    }
102
103
    /**
104
     * @param string $location
105
     * @return string
106
     * @codeCoverageIgnore
107
     * @see \kalanis\UploadPerPartes\DataStorage\VolumeBasic::getPart
108
     */
109 3
    public function uppCannotReadFile(string $location): string
110
    {
111 3
        return 'CANNOT READ FILE';
112
    }
113
114
    /**
115
     * @param string $location
116
     * @return string
117
     * @codeCoverageIgnore   no ideas how to fail seek
118
     * @see \kalanis\UploadPerPartes\DataStorage\VolumeBasic::addPart
119
     */
120
    public function uppCannotSeekFile(string $location): string
121
    {
122
        return 'CANNOT SEEK FILE';
123
    }
124
125
    /**
126
     * @param string $location
127
     * @return string
128
     * @codeCoverageIgnore
129
     * @see \kalanis\UploadPerPartes\DataStorage\VolumeBasic::addPart
130
     */
131
    public function uppCannotWriteFile(string $location): string
132
    {
133
        return 'CANNOT WRITE FILE';
134
    }
135
136
    /**
137
     * @param string $location
138
     * @return string
139
     * @codeCoverageIgnore
140
     * @see \kalanis\UploadPerPartes\DataStorage\VolumeBasic::truncate
141
     */
142 2
    public function uppCannotTruncateFile(string $location): string
143
    {
144 2
        return 'FILE CANNOT TRUNCATE';
145
    }
146
147 2
    public function uppSegmentOutOfBounds(int $segment): string
148
    {
149 2
        return 'SEGMENT OUT OF BOUNDS';
150
    }
151
152 3
    public function uppSegmentNotUploadedYet(int $segment): string
153
    {
154 3
        return 'SEGMENT NOT UPLOADED YET';
155
    }
156
}
157