Passed
Branch master (43d553)
by Sebastian
02:54
created
src/RequestHelper/Boundaries/Boundary.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -19,29 +19,29 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class RequestHelper_Boundaries_Boundary
21 21
 {
22
-   /**
23
-    * @var string
24
-    */
22
+    /**
23
+     * @var string
24
+     */
25 25
     protected $content;
26 26
     
27
-   /**
28
-    * @var array
29
-    */
27
+    /**
28
+     * @var array
29
+     */
30 30
     protected $dispositionParams = array();
31 31
 
32
-   /**
33
-    * @var string
34
-    */
32
+    /**
33
+     * @var string
34
+     */
35 35
     protected $contentType = '';
36 36
 
37
-   /**
38
-    * @var string
39
-    */
37
+    /**
38
+     * @var string
39
+     */
40 40
     protected $contentEncoding = '';
41 41
     
42
-   /**
43
-    * @var RequestHelper_Boundaries
44
-    */
42
+    /**
43
+     * @var RequestHelper_Boundaries
44
+     */
45 45
     protected $boundaries;
46 46
     
47 47
     public function __construct(RequestHelper_Boundaries $boundaries, string $content)
@@ -55,46 +55,46 @@  discard block
 block discarded – undo
55 55
         return strlen($this->content);
56 56
     }
57 57
     
58
-   /**
59
-    * Sets the name of the request parameter.
60
-    * 
61
-    * @param string $name
62
-    * @return RequestHelper_Boundaries_Boundary
63
-    */
58
+    /**
59
+     * Sets the name of the request parameter.
60
+     * 
61
+     * @param string $name
62
+     * @return RequestHelper_Boundaries_Boundary
63
+     */
64 64
     public function setName(string $name) : RequestHelper_Boundaries_Boundary
65 65
     {
66 66
         return $this->setDispositionParam('name', $name);
67 67
     }
68 68
     
69
-   /**
70
-    * Sets the filename to use for the content, if applicable.
71
-    *  
72
-    * @param string $fileName
73
-    * @return RequestHelper_Boundaries_Boundary
74
-    */
69
+    /**
70
+     * Sets the filename to use for the content, if applicable.
71
+     *  
72
+     * @param string $fileName
73
+     * @return RequestHelper_Boundaries_Boundary
74
+     */
75 75
     public function setFileName(string $fileName) : RequestHelper_Boundaries_Boundary
76 76
     {
77 77
         return $this->setDispositionParam('filename', $fileName);
78 78
     }
79 79
     
80
-   /**
81
-    * Sets the content type to use for the content.
82
-    * 
83
-    * @param string $contentType
84
-    * @return RequestHelper_Boundaries_Boundary
85
-    */
80
+    /**
81
+     * Sets the content type to use for the content.
82
+     * 
83
+     * @param string $contentType
84
+     * @return RequestHelper_Boundaries_Boundary
85
+     */
86 86
     public function setContentType(string $contentType) : RequestHelper_Boundaries_Boundary
87 87
     {
88 88
         $this->contentType = $contentType;
89 89
         return $this;
90 90
     }
91 91
     
92
-   /**
93
-    * Sets the encoding to specify for the content.
94
-    * 
95
-    * @param string $encoding An encoding string, e.g. "UTF-8", "ASCII"
96
-    * @return RequestHelper_Boundaries_Boundary
97
-    */
92
+    /**
93
+     * Sets the encoding to specify for the content.
94
+     * 
95
+     * @param string $encoding An encoding string, e.g. "UTF-8", "ASCII"
96
+     * @return RequestHelper_Boundaries_Boundary
97
+     */
98 98
     public function setContentEncoding(string $encoding) : RequestHelper_Boundaries_Boundary
99 99
     {
100 100
         $this->contentEncoding = $encoding;
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         return $this;
108 108
     }
109 109
     
110
-   /**
111
-    * Renders the mime boundary text.
112
-    * 
113
-    * @return string
114
-    */
110
+    /**
111
+     * Renders the mime boundary text.
112
+     * 
113
+     * @return string
114
+     */
115 115
     public function render()
116 116
     {
117 117
         $eol = $this->boundaries->getEOL();
Please login to merge, or discard this patch.
src/RequestHelper/Response.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -19,51 +19,51 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class RequestHelper_Response
21 21
 {
22
-   /**
23
-    * @var RequestHelper
24
-    */
22
+    /**
23
+     * @var RequestHelper
24
+     */
25 25
     protected $request;
26 26
     
27
-   /**
28
-    * @var string
29
-    */
27
+    /**
28
+     * @var string
29
+     */
30 30
     protected $body = '';
31 31
     
32
-   /**
33
-    * @var array
34
-    */
32
+    /**
33
+     * @var array
34
+     */
35 35
     protected $info;
36 36
     
37
-   /**
38
-    * @var bool
39
-    */
37
+    /**
38
+     * @var bool
39
+     */
40 40
     protected $isError = false;
41 41
     
42
-   /**
43
-    * @var string
44
-    */
42
+    /**
43
+     * @var string
44
+     */
45 45
     protected $errorMessage = '';
46 46
     
47
-   /**
48
-    * @var integer
49
-    */
47
+    /**
48
+     * @var integer
49
+     */
50 50
     protected $errorCode = 0;
51 51
     
52
-   /**
53
-    * @param RequestHelper $helper
54
-    * @param array $info The CURL info array from curl_getinfo().
55
-    */
52
+    /**
53
+     * @param RequestHelper $helper
54
+     * @param array $info The CURL info array from curl_getinfo().
55
+     */
56 56
     public function __construct(RequestHelper $helper, array $info)
57 57
     {
58 58
         $this->request = $helper;
59 59
         $this->info = $info;
60 60
     }
61 61
     
62
-   /**
63
-    * Retrieves the request instance that initiated the request.
64
-    *  
65
-    * @return RequestHelper
66
-    */
62
+    /**
63
+     * Retrieves the request instance that initiated the request.
64
+     *  
65
+     * @return RequestHelper
66
+     */
67 67
     public function getRequest() : RequestHelper
68 68
     {
69 69
         return $this->request;
@@ -84,70 +84,70 @@  discard block
 block discarded – undo
84 84
         return $this;
85 85
     }
86 86
     
87
-   /**
88
-    * Whether an error occurred in the request.
89
-    * @return bool
90
-    */
87
+    /**
88
+     * Whether an error occurred in the request.
89
+     * @return bool
90
+     */
91 91
     public function isError() : bool
92 92
     {
93 93
         return $this->isError;
94 94
     }
95 95
     
96
-   /**
97
-    * Retrieves the native error message, if an error occurred.
98
-    * @return string
99
-    */
96
+    /**
97
+     * Retrieves the native error message, if an error occurred.
98
+     * @return string
99
+     */
100 100
     public function getErrorMessage() : string
101 101
     {
102 102
         return $this->errorMessage;
103 103
     }
104 104
     
105
-   /**
106
-    * Retrieves the native error code, if an error occurred.
107
-    * @return int
108
-    */
105
+    /**
106
+     * Retrieves the native error code, if an error occurred.
107
+     * @return int
108
+     */
109 109
     public function getErrorCode() : int
110 110
     {
111 111
         return $this->errorCode;
112 112
     }
113 113
     
114 114
     
115
-   /**
116
-    * Retrieves the full body of the request.
117
-    * 
118
-    * @return string
119
-    */
115
+    /**
116
+     * Retrieves the full body of the request.
117
+     * 
118
+     * @return string
119
+     */
120 120
     public function getRequestBody() : string
121 121
     {
122 122
         return $this->request->getBody();
123 123
     }
124 124
     
125
-   /**
126
-    * Retrieves the body of the response, if any.
127
-    * 
128
-    * @return string
129
-    */
125
+    /**
126
+     * Retrieves the body of the response, if any.
127
+     * 
128
+     * @return string
129
+     */
130 130
     public function getResponseBody() : string
131 131
     {
132 132
         return $this->body;
133 133
     }
134 134
     
135
-   /**
136
-    * The response HTTP code.
137
-    * 
138
-    * @return int The code, or 0 if none was sent (on error).
139
-    */
135
+    /**
136
+     * The response HTTP code.
137
+     * 
138
+     * @return int The code, or 0 if none was sent (on error).
139
+     */
140 140
     public function getCode() : int
141 141
     {
142 142
         return intval($this->getInfoKey('http_code'));
143 143
     }
144 144
     
145
-   /**
146
-    * Retrieves the actual headers that were sent in the request:
147
-    * one header by entry in the indexed array.
148
-    * 
149
-    * @return array
150
-    */
145
+    /**
146
+     * Retrieves the actual headers that were sent in the request:
147
+     * one header by entry in the indexed array.
148
+     * 
149
+     * @return array
150
+     */
151 151
     public function getHeaders() : array
152 152
     {
153 153
         return ConvertHelper::explodeTrim("\n", $this->getInfoKey('request_header'));
Please login to merge, or discard this patch.
src/URLInfo/Normalizer.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,23 +32,23 @@
 block discarded – undo
32 32
         $this->info = $info;
33 33
     }
34 34
     
35
-   /**
36
-    * Enables the authentication information in the URL,
37
-    * if a username and password are present.
38
-    * 
39
-    * @param bool $enable Whether to turn it on or off.
40
-    * @return URLInfo_Normalizer
41
-    */
35
+    /**
36
+     * Enables the authentication information in the URL,
37
+     * if a username and password are present.
38
+     * 
39
+     * @param bool $enable Whether to turn it on or off.
40
+     * @return URLInfo_Normalizer
41
+     */
42 42
     public function enableAuth(bool $enable=true) : URLInfo_Normalizer
43 43
     {
44 44
         $this->auth = $enable;
45 45
         return $this;
46 46
     }
47 47
     
48
-   /**
49
-    * Retrieves the normalized URL.
50
-    * @return string
51
-    */
48
+    /**
49
+     * Retrieves the normalized URL.
50
+     * @return string
51
+     */
52 52
     public function normalize() : string
53 53
     {
54 54
         $method = 'normalize_'.$this->info->getType();
Please login to merge, or discard this patch.
src/ConvertHelper/IntervalConverter.php 1 patch
Indentation   +38 added lines, -39 removed lines patch added patch discarded remove patch
@@ -17,21 +17,20 @@  discard block
 block discarded – undo
17 17
  * @package Application Utils
18 18
  * @subpackage ConvertHelper
19 19
  * @author Sebastian Mordziol <[email protected]>
20
-
21 20
  * @see ConvertHelper::interval2string()
22 21
  */
23 22
 class ConvertHelper_IntervalConverter
24 23
 {
25 24
     const ERROR_MISSING_TRANSLATION = 43501;
26 25
     
27
-   /**
28
-    * @var array|NULL
29
-    */
26
+    /**
27
+     * @var array|NULL
28
+     */
30 29
     protected static $texts = null;
31 30
     
32
-   /**
33
-    * @var array
34
-    */
31
+    /**
32
+     * @var array
33
+     */
35 34
     protected $tokens = array('y', 'm', 'd', 'h', 'i', 's');
36 35
     
37 36
     public function __construct()
@@ -41,25 +40,25 @@  discard block
 block discarded – undo
41 40
         }
42 41
     }
43 42
     
44
-   /**
45
-    * Called whenever the application locale has changed,
46
-    * to reset the internal translation cache.
47
-    */
43
+    /**
44
+     * Called whenever the application locale has changed,
45
+     * to reset the internal translation cache.
46
+     */
48 47
     public function handle_localeChanged()
49 48
     {
50 49
         self::$texts = null;
51 50
     }
52 51
     
53
-   /**
54
-    * Converts the specified interval to a human readable
55
-    * string, e.g. "2 hours and 4 minutes".
56
-    * 
57
-    * @param \DateInterval $interval
58
-    * @return string
59
-    * @throws ConvertHelper_Exception
60
-    * 
61
-    * @see ConvertHelper_IntervalConverter::ERROR_MISSING_TRANSLATION
62
-    */
52
+    /**
53
+     * Converts the specified interval to a human readable
54
+     * string, e.g. "2 hours and 4 minutes".
55
+     * 
56
+     * @param \DateInterval $interval
57
+     * @return string
58
+     * @throws ConvertHelper_Exception
59
+     * 
60
+     * @see ConvertHelper_IntervalConverter::ERROR_MISSING_TRANSLATION
61
+     */
63 62
     public function toString(\DateInterval $interval) : string
64 63
     {
65 64
         $this->initTexts();
@@ -88,14 +87,14 @@  discard block
 block discarded – undo
88 87
         return t('%1$s and %2$s', implode(', ', $parts), $last);
89 88
     }
90 89
     
91
-   /**
92
-    * Translates the selected time token, e.g. "y" (for year).
93
-    * 
94
-    * @param string $token
95
-    * @param ConvertHelper_DateInterval $interval
96
-    * @throws ConvertHelper_Exception
97
-    * @return string
98
-    */
90
+    /**
91
+     * Translates the selected time token, e.g. "y" (for year).
92
+     * 
93
+     * @param string $token
94
+     * @param ConvertHelper_DateInterval $interval
95
+     * @throws ConvertHelper_Exception
96
+     * @return string
97
+     */
99 98
     protected function translateToken(string $token, ConvertHelper_DateInterval $interval) : string
100 99
     {
101 100
         $value = $interval->getToken($token);
@@ -123,13 +122,13 @@  discard block
 block discarded – undo
123 122
         );
124 123
     }
125 124
     
126
-   /**
127
-    * Resolves all time tokens that need to be translated in
128
-    * the subject interval, depending on its length.
129
-    * 
130
-    * @param ConvertHelper_DateInterval $interval
131
-    * @return array
132
-    */
125
+    /**
126
+     * Resolves all time tokens that need to be translated in
127
+     * the subject interval, depending on its length.
128
+     * 
129
+     * @param ConvertHelper_DateInterval $interval
130
+     * @return array
131
+     */
133 132
     protected function resolveTokens(ConvertHelper_DateInterval $interval) : array
134 133
     {
135 134
         $offset = 0;
@@ -147,9 +146,9 @@  discard block
 block discarded – undo
147 146
         return array();
148 147
     }
149 148
     
150
-   /**
151
-    * Initializes the translateable strings.
152
-    */
149
+    /**
150
+     * Initializes the translateable strings.
151
+     */
153 152
     protected function initTexts() : void
154 153
     {
155 154
         if(isset(self::$texts)) {
Please login to merge, or discard this patch.
src/URLInfo.php 1 patch
Indentation   +166 added lines, -166 removed lines patch added patch discarded remove patch
@@ -39,42 +39,42 @@  discard block
 block discarded – undo
39 39
     const TYPE_PHONE = 'phone';
40 40
     const TYPE_URL = 'url';
41 41
     
42
-   /**
43
-    * The original URL that was passed to the constructor.
44
-    * @var string
45
-    */
42
+    /**
43
+     * The original URL that was passed to the constructor.
44
+     * @var string
45
+     */
46 46
     protected $rawURL;
47 47
 
48
-   /**
49
-    * @var array
50
-    */
48
+    /**
49
+     * @var array
50
+     */
51 51
     protected $info;
52 52
     
53
-   /**
54
-    * @var string[]
55
-    */
53
+    /**
54
+     * @var string[]
55
+     */
56 56
     protected $excludedParams = array();
57 57
     
58
-   /**
59
-    * @var bool
60
-    * @see URLInfo::setParamExclusion()
61
-    */
58
+    /**
59
+     * @var bool
60
+     * @see URLInfo::setParamExclusion()
61
+     */
62 62
     protected $paramExclusion = false;
63 63
     
64
-   /**
65
-    * @var array
66
-    * @see URLInfo::getTypeLabel()
67
-    */
64
+    /**
65
+     * @var array
66
+     * @see URLInfo::getTypeLabel()
67
+     */
68 68
     protected static $typeLabels;
69 69
     
70
-   /**
71
-    * @var bool
72
-    */
70
+    /**
71
+     * @var bool
72
+     */
73 73
     protected $highlightExcluded = false;
74 74
     
75
-   /**
76
-    * @var array
77
-    */
75
+    /**
76
+     * @var array
77
+     */
78 78
     protected $infoKeys = array(
79 79
         'scheme',
80 80
         'host',
@@ -86,19 +86,19 @@  discard block
 block discarded – undo
86 86
         'fragment'
87 87
     );
88 88
     
89
-   /**
90
-    * @var string
91
-    */
89
+    /**
90
+     * @var string
91
+     */
92 92
     protected $url;
93 93
     
94
-   /**
95
-    * @var URLInfo_Parser
96
-    */
94
+    /**
95
+     * @var URLInfo_Parser
96
+     */
97 97
     protected $parser;
98 98
     
99
-   /**
100
-    * @var URLInfo_Normalizer
101
-    */
99
+    /**
100
+     * @var URLInfo_Normalizer
101
+     */
102 102
     protected $normalizer;
103 103
     
104 104
     public function __construct(string $url)
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
         $this->info = $this->parser->getInfo();
111 111
     }
112 112
     
113
-   /**
114
-    * Filters an URL: removes control characters and the
115
-    * like to have a clean URL to work with.
116
-    * 
117
-    * @param string $url
118
-    * @return string
119
-    */
113
+    /**
114
+     * Filters an URL: removes control characters and the
115
+     * like to have a clean URL to work with.
116
+     * 
117
+     * @param string $url
118
+     * @return string
119
+     */
120 120
     public static function filterURL(string $url)
121 121
     {
122 122
         return URLInfo_Filter::filter($url);
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
         return $this->info['type'] === self::TYPE_PHONE;
147 147
     }
148 148
     
149
-   /**
150
-    * Whether the URL is a regular URL, not one of the 
151
-    * other types like a phone number or email address.
152
-    * 
153
-    * @return bool
154
-    */
149
+    /**
150
+     * Whether the URL is a regular URL, not one of the 
151
+     * other types like a phone number or email address.
152
+     * 
153
+     * @return bool
154
+     */
155 155
     public function isURL() : bool
156 156
     {
157 157
         $host = $this->getHost();
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
         return $this->parser->isValid();
164 164
     }
165 165
     
166
-   /**
167
-    * Retrieves the host name, or an empty string if none is present.
168
-    * 
169
-    * @return string
170
-    */
166
+    /**
167
+     * Retrieves the host name, or an empty string if none is present.
168
+     * 
169
+     * @return string
170
+     */
171 171
     public function getHost() : string
172 172
     {
173 173
         return $this->getInfoKey('host');
174 174
     }
175 175
     
176
-   /**
177
-    * Retrieves the path, or an empty string if none is present.
178
-    * @return string
179
-    */
176
+    /**
177
+     * Retrieves the path, or an empty string if none is present.
178
+     * @return string
179
+     */
180 180
     public function getPath() : string
181 181
     {
182 182
         return $this->getInfoKey('path');
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
         return $this->getInfoKey('scheme');
193 193
     }
194 194
     
195
-   /**
196
-    * Retrieves the port specified in the URL, or -1 if none is preseent.
197
-    * @return int
198
-    */
195
+    /**
196
+     * Retrieves the port specified in the URL, or -1 if none is preseent.
197
+     * @return int
198
+     */
199 199
     public function getPort() : int
200 200
     {
201 201
         $port = $this->getInfoKey('port');
@@ -207,13 +207,13 @@  discard block
 block discarded – undo
207 207
         return -1;
208 208
     }
209 209
     
210
-   /**
211
-    * Retrieves the raw query string, or an empty string if none is present.
212
-    * 
213
-    * @return string
214
-    * 
215
-    * @see URLInfo::getParams()
216
-    */
210
+    /**
211
+     * Retrieves the raw query string, or an empty string if none is present.
212
+     * 
213
+     * @return string
214
+     * 
215
+     * @see URLInfo::getParams()
216
+     */
217 217
     public function getQuery() : string
218 218
     {
219 219
         return $this->getInfoKey('query');
@@ -229,20 +229,20 @@  discard block
 block discarded – undo
229 229
         return $this->getInfoKey('pass');
230 230
     }
231 231
     
232
-   /**
233
-    * Whether the URL contains a port number.
234
-    * @return bool
235
-    */
232
+    /**
233
+     * Whether the URL contains a port number.
234
+     * @return bool
235
+     */
236 236
     public function hasPort() : bool
237 237
     {
238 238
         return $this->getPort() !== -1;
239 239
     }
240 240
     
241
-   /**
242
-    * Alias for the hasParams() method.
243
-    * @return bool
244
-    * @see URLInfo::hasParams()
245
-    */
241
+    /**
242
+     * Alias for the hasParams() method.
243
+     * @return bool
244
+     * @see URLInfo::hasParams()
245
+     */
246 246
     public function hasQuery() : bool
247 247
     {
248 248
         return $this->hasParams();
@@ -287,23 +287,23 @@  discard block
 block discarded – undo
287 287
         return '';
288 288
     }
289 289
 
290
-   /**
291
-    * Retrieves a normalized URL: this ensures that all parameters
292
-    * in the URL are always in the same order.
293
-    * 
294
-    * @return string
295
-    */
290
+    /**
291
+     * Retrieves a normalized URL: this ensures that all parameters
292
+     * in the URL are always in the same order.
293
+     * 
294
+     * @return string
295
+     */
296 296
     public function getNormalized() : string
297 297
     {
298 298
         return $this->normalize(true);
299 299
     }
300 300
     
301
-   /**
302
-    * Like getNormalized(), but if a username and password are present
303
-    * in the URL, returns the URL without them.
304
-    * 
305
-    * @return string
306
-    */
301
+    /**
302
+     * Like getNormalized(), but if a username and password are present
303
+     * in the URL, returns the URL without them.
304
+     * 
305
+     * @return string
306
+     */
307 307
     public function getNormalizedWithoutAuth() : string
308 308
     {
309 309
         return $this->normalize(false);
@@ -324,25 +324,25 @@  discard block
 block discarded – undo
324 324
         return $this->normalizer->normalize();
325 325
     }
326 326
     
327
-   /**
328
-    * Creates a hash of the URL, which can be used for comparisons.
329
-    * Since any parameters in the URL's query are sorted alphabetically,
330
-    * the same links with a different parameter order will have the 
331
-    * same hash.
332
-    * 
333
-    * @return string
334
-    */
327
+    /**
328
+     * Creates a hash of the URL, which can be used for comparisons.
329
+     * Since any parameters in the URL's query are sorted alphabetically,
330
+     * the same links with a different parameter order will have the 
331
+     * same hash.
332
+     * 
333
+     * @return string
334
+     */
335 335
     public function getHash()
336 336
     {
337 337
         return \AppUtils\ConvertHelper::string2shortHash($this->getNormalized());
338 338
     }
339 339
 
340
-   /**
341
-    * Highlights the URL using HTML tags with specific highlighting
342
-    * class names.
343
-    * 
344
-    * @return string Will return an empty string if the URL is not valid.
345
-    */
340
+    /**
341
+     * Highlights the URL using HTML tags with specific highlighting
342
+     * class names.
343
+     * 
344
+     * @return string Will return an empty string if the URL is not valid.
345
+     */
346 346
     public function getHighlighted() : string
347 347
     {
348 348
         if(!$this->isValid()) {
@@ -376,15 +376,15 @@  discard block
 block discarded – undo
376 376
         return count($params);
377 377
     }
378 378
     
379
-   /**
380
-    * Retrieves all parameters specified in the url,
381
-    * if any, as an associative array. 
382
-    * 
383
-    * NOTE: Ignores parameters that have been added
384
-    * to the excluded parameters list.
385
-    *
386
-    * @return array
387
-    */
379
+    /**
380
+     * Retrieves all parameters specified in the url,
381
+     * if any, as an associative array. 
382
+     * 
383
+     * NOTE: Ignores parameters that have been added
384
+     * to the excluded parameters list.
385
+     *
386
+     * @return array
387
+     */
388 388
     public function getParams() : array
389 389
     {
390 390
         if(!$this->paramExclusion || empty($this->excludedParams)) {
@@ -402,22 +402,22 @@  discard block
 block discarded – undo
402 402
         return $keep;
403 403
     }
404 404
     
405
-   /**
406
-    * Retrieves the names of all parameters present in the URL, if any.
407
-    * @return string[]
408
-    */
405
+    /**
406
+     * Retrieves the names of all parameters present in the URL, if any.
407
+     * @return string[]
408
+     */
409 409
     public function getParamNames() : array
410 410
     {
411 411
         $params = $this->getParams();
412 412
         return array_keys($params);
413 413
     }
414 414
     
415
-   /**
416
-    * Retrieves a specific parameter value from the URL.
417
-    * 
418
-    * @param string $name
419
-    * @return string The parameter value, or an empty string if it does not exist.
420
-    */
415
+    /**
416
+     * Retrieves a specific parameter value from the URL.
417
+     * 
418
+     * @param string $name
419
+     * @return string The parameter value, or an empty string if it does not exist.
420
+     */
421 421
     public function getParam(string $name) : string
422 422
     {
423 423
         if(isset($this->info['params'][$name])) {
@@ -427,16 +427,16 @@  discard block
 block discarded – undo
427 427
         return '';
428 428
     }
429 429
     
430
-   /**
431
-    * Excludes an URL parameter entirely if present:
432
-    * the parser will act as if the parameter was not
433
-    * even present in the source URL, effectively
434
-    * stripping it.
435
-    *
436
-    * @param string $name
437
-    * @param string $reason A human readable explanation why this is excluded - used when highlighting links.
438
-    * @return URLInfo
439
-    */
430
+    /**
431
+     * Excludes an URL parameter entirely if present:
432
+     * the parser will act as if the parameter was not
433
+     * even present in the source URL, effectively
434
+     * stripping it.
435
+     *
436
+     * @param string $name
437
+     * @param string $reason A human readable explanation why this is excluded - used when highlighting links.
438
+     * @return URLInfo
439
+     */
440 440
     public function excludeParam(string $name, string $reason) : URLInfo
441 441
     {
442 442
         if(!isset($this->excludedParams[$name]))
@@ -489,25 +489,25 @@  discard block
 block discarded – undo
489 489
         return self::$typeLabels[$this->getType()];
490 490
     }
491 491
 
492
-   /**
493
-    * Whether excluded parameters should be highlighted in
494
-    * a different color in the URL when using the
495
-    * {@link URLInfo::getHighlighted()} method.
496
-    *
497
-    * @param bool $highlight
498
-    * @return URLInfo
499
-    */
492
+    /**
493
+     * Whether excluded parameters should be highlighted in
494
+     * a different color in the URL when using the
495
+     * {@link URLInfo::getHighlighted()} method.
496
+     *
497
+     * @param bool $highlight
498
+     * @return URLInfo
499
+     */
500 500
     public function setHighlightExcluded(bool $highlight=true) : URLInfo
501 501
     {
502 502
         $this->highlightExcluded = $highlight;
503 503
         return $this;
504 504
     }
505 505
     
506
-   /**
507
-    * Returns an array with all relevant URL information.
508
-    * 
509
-    * @return array
510
-    */
506
+    /**
507
+     * Returns an array with all relevant URL information.
508
+     * 
509
+     * @return array
510
+     */
511 511
     public function toArray() : array
512 512
     {
513 513
         return array(
@@ -551,24 +551,24 @@  discard block
 block discarded – undo
551 551
         return $this;
552 552
     }
553 553
     
554
-   /**
555
-    * Whether the parameter exclusion mode is enabled:
556
-    * In this case, if any parameters have been added to the
557
-    * exclusion list, all relevant methods will exclude these.
558
-    *
559
-    * @return bool
560
-    */
554
+    /**
555
+     * Whether the parameter exclusion mode is enabled:
556
+     * In this case, if any parameters have been added to the
557
+     * exclusion list, all relevant methods will exclude these.
558
+     *
559
+     * @return bool
560
+     */
561 561
     public function isParamExclusionEnabled() : bool
562 562
     {
563 563
         return $this->paramExclusion;
564 564
     }
565 565
     
566
-   /**
567
-    * Checks whether the link contains any parameters that
568
-    * are on the list of excluded parameters.
569
-    *
570
-    * @return bool
571
-    */
566
+    /**
567
+     * Checks whether the link contains any parameters that
568
+     * are on the list of excluded parameters.
569
+     *
570
+     * @return bool
571
+     */
572 572
     public function containsExcludedParams() : bool
573 573
     {
574 574
         if(empty($this->excludedParams)) {
@@ -636,16 +636,16 @@  discard block
 block discarded – undo
636 636
         return $this->highlightExcluded;
637 637
     }
638 638
     
639
-   /**
640
-    * Checks if the URL exists, i.e. can be connected to. Will return
641
-    * true if the returned HTTP status code is `200` or `302`.
642
-    * 
643
-    * NOTE: If the target URL requires HTTP authentication, the username
644
-    * and password should be integrated into the URL.
645
-    * 
646
-    * @return bool
647
-    * @throws BaseException
648
-    */
639
+    /**
640
+     * Checks if the URL exists, i.e. can be connected to. Will return
641
+     * true if the returned HTTP status code is `200` or `302`.
642
+     * 
643
+     * NOTE: If the target URL requires HTTP authentication, the username
644
+     * and password should be integrated into the URL.
645
+     * 
646
+     * @return bool
647
+     * @throws BaseException
648
+     */
649 649
     public function tryConnect(bool $verifySSL=true) : bool
650 650
     {
651 651
         requireCURL();
Please login to merge, or discard this patch.
src/ConvertHelper/DurationConverter.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -26,39 +26,39 @@  discard block
 block discarded – undo
26 26
     const ERROR_NO_DATE_FROM_SET = 43401;
27 27
     
28 28
     
29
-   /**
30
-    * @var int
31
-    */
29
+    /**
30
+     * @var int
31
+     */
32 32
     protected $dateFrom;
33 33
     
34
-   /**
35
-    * @var int
36
-    */
34
+    /**
35
+     * @var int
36
+     */
37 37
     protected $dateTo;
38 38
     
39
-   /**
40
-    * @var bool
41
-    */
39
+    /**
40
+     * @var bool
41
+     */
42 42
     protected $future = false;
43 43
     
44
-   /**
45
-    * @var string
46
-    */
44
+    /**
45
+     * @var string
46
+     */
47 47
     protected $interval = '';
48 48
     
49
-   /**
50
-    * @var int
51
-    */
49
+    /**
50
+     * @var int
51
+     */
52 52
     protected $difference = 0;
53 53
     
54
-   /**
55
-    * @var int
56
-    */
54
+    /**
55
+     * @var int
56
+     */
57 57
     protected $dateDiff = 0;
58 58
     
59
-   /**
60
-    * @var array|NULL
61
-    */
59
+    /**
60
+     * @var array|NULL
61
+     */
62 62
     protected static $texts = null;
63 63
     
64 64
     public function __construct()
@@ -78,17 +78,17 @@  discard block
 block discarded – undo
78 78
         self::$texts = null;
79 79
     }
80 80
     
81
-   /**
82
-    * Sets the origin date to calculate from.
83
-    * 
84
-    * NOTE: if this is further in the future than
85
-    * the to: date, it will be considered as a 
86
-    * calculation for something to come, i.e. 
87
-    * "In two days".
88
-    *  
89
-    * @param \DateTime $date
90
-    * @return ConvertHelper_DurationConverter
91
-    */
81
+    /**
82
+     * Sets the origin date to calculate from.
83
+     * 
84
+     * NOTE: if this is further in the future than
85
+     * the to: date, it will be considered as a 
86
+     * calculation for something to come, i.e. 
87
+     * "In two days".
88
+     *  
89
+     * @param \DateTime $date
90
+     * @return ConvertHelper_DurationConverter
91
+     */
92 92
     public function setDateFrom(\DateTime $date) : ConvertHelper_DurationConverter
93 93
     {
94 94
         $this->dateFrom = ConvertHelper::date2timestamp($date);
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
         return $this;
97 97
     }
98 98
     
99
-   /**
100
-    * Sets the date to calculate to. Defaults to 
101
-    * the current time if not set.
102
-    * 
103
-    * @param \DateTime $date
104
-    * @return ConvertHelper_DurationConverter
105
-    */
99
+    /**
100
+     * Sets the date to calculate to. Defaults to 
101
+     * the current time if not set.
102
+     * 
103
+     * @param \DateTime $date
104
+     * @return ConvertHelper_DurationConverter
105
+     */
106 106
     public function setDateTo(\DateTime $date) : ConvertHelper_DurationConverter
107 107
     {
108 108
         $this->dateTo = ConvertHelper::date2timestamp($date);
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
         return $this;
111 111
     }
112 112
     
113
-   /**
114
-    * Converts the specified dates to a human readable string.
115
-    * 
116
-    * @throws ConvertHelper_Exception
117
-    * @return string
118
-    * 
119
-    * @see ConvertHelper_DurationConverter::ERROR_NO_DATE_FROM_SET
120
-    */
113
+    /**
114
+     * Converts the specified dates to a human readable string.
115
+     * 
116
+     * @throws ConvertHelper_Exception
117
+     * @return string
118
+     * 
119
+     * @see ConvertHelper_DurationConverter::ERROR_NO_DATE_FROM_SET
120
+     */
121 121
     public function convert() : string
122 122
     {
123 123
         $this->initTexts();
Please login to merge, or discard this patch.
src/RequestHelper.php 1 patch
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -29,56 +29,56 @@  discard block
 block discarded – undo
29 29
     
30 30
     const ERROR_CURL_INIT_FAILED = 17903;
31 31
 
32
-   /**
33
-    * @var string
34
-    */
32
+    /**
33
+     * @var string
34
+     */
35 35
     protected $eol = "\r\n";
36 36
 
37
-   /**
38
-    * @var string
39
-    */
37
+    /**
38
+     * @var string
39
+     */
40 40
     protected $mimeBoundary;
41 41
 
42
-   /**
43
-    * @var string
44
-    */
42
+    /**
43
+     * @var string
44
+     */
45 45
     protected $data = '';
46 46
 
47
-   /**
48
-    * @var string
49
-    */
47
+    /**
48
+     * @var string
49
+     */
50 50
     protected $destination;
51 51
 
52
-   /**
53
-    * @var array
54
-    */
52
+    /**
53
+     * @var array
54
+     */
55 55
     protected $headers = array();
56 56
     
57
-   /**
58
-    * Whether to verify SSL certificates.
59
-    * @var bool
60
-    */
57
+    /**
58
+     * Whether to verify SSL certificates.
59
+     * @var bool
60
+     */
61 61
     protected $verifySSL = true;
62 62
     
63
-   /**
64
-    * @var RequestHelper_Boundaries
65
-    */
63
+    /**
64
+     * @var RequestHelper_Boundaries
65
+     */
66 66
     protected $boundaries;
67 67
     
68
-   /**
69
-    * @var RequestHelper_Response|NULL
70
-    */
68
+    /**
69
+     * @var RequestHelper_Response|NULL
70
+     */
71 71
     protected $response;
72 72
 
73
-   /**
74
-    * @var integer
75
-    */
73
+    /**
74
+     * @var integer
75
+     */
76 76
     protected $timeout = 30;
77 77
     
78
-   /**
79
-    * Creates a new request helper to send POST data to the specified destination URL.
80
-    * @param string $destinationURL
81
-    */
78
+    /**
79
+     * Creates a new request helper to send POST data to the specified destination URL.
80
+     * @param string $destinationURL
81
+     */
82 82
     public function __construct(string $destinationURL)
83 83
     {
84 84
         $this->destination = $destinationURL;
@@ -105,15 +105,15 @@  discard block
 block discarded – undo
105 105
         return $this;
106 106
     }
107 107
 
108
-   /**
109
-    * Adds a file to be sent with the request.
110
-    *
111
-    * @param string $varName The variable name to send the file in
112
-    * @param string $fileName The name of the file as it should be received at the destination
113
-    * @param string $content The raw content of the file
114
-    * @param string $contentType The content type, use the constants to specify this
115
-    * @param string $encoding The encoding of the file, use the constants to specify this
116
-    */
108
+    /**
109
+     * Adds a file to be sent with the request.
110
+     *
111
+     * @param string $varName The variable name to send the file in
112
+     * @param string $fileName The name of the file as it should be received at the destination
113
+     * @param string $content The raw content of the file
114
+     * @param string $contentType The content type, use the constants to specify this
115
+     * @param string $encoding The encoding of the file, use the constants to specify this
116
+     */
117 117
     public function addFile(string $varName, string $fileName, string $content, string $contentType = self::FILETYPE_TEXT, string $encoding = self::ENCODING_UTF8) : RequestHelper
118 118
     {
119 119
         $this->boundaries->addFile($varName, $fileName, $content, $contentType, $encoding);
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
         return $this;
122 122
     }
123 123
     
124
-   /**
125
-    * Adds arbitrary content.
126
-    * 
127
-    * @param string $varName The variable name to send the content in.
128
-    * @param string $content
129
-    * @param string $contentType
130
-    */
124
+    /**
125
+     * Adds arbitrary content.
126
+     * 
127
+     * @param string $varName The variable name to send the content in.
128
+     * @param string $content
129
+     * @param string $contentType
130
+     */
131 131
     public function addContent(string $varName, string $content, string $contentType) : RequestHelper
132 132
     {
133 133
         $this->boundaries->addContent($varName, $content, $contentType);
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
         return $this;
150 150
     }
151 151
     
152
-   /**
153
-    * Sets an HTTP header to include in the request.
154
-    * 
155
-    * @param string $name
156
-    * @param string $value
157
-    * @return RequestHelper
158
-    */
152
+    /**
153
+     * Sets an HTTP header to include in the request.
154
+     * 
155
+     * @param string $name
156
+     * @param string $value
157
+     * @return RequestHelper
158
+     */
159 159
     public function setHeader(string $name, string $value) : RequestHelper
160 160
     {
161 161
         $this->headers[$name] = $value;
@@ -163,36 +163,36 @@  discard block
 block discarded – undo
163 163
         return $this;
164 164
     }
165 165
     
166
-   /**
167
-    * Disables SSL certificate checking.
168
-    * 
169
-    * @return RequestHelper
170
-    */
166
+    /**
167
+     * Disables SSL certificate checking.
168
+     * 
169
+     * @return RequestHelper
170
+     */
171 171
     public function disableSSLChecks() : RequestHelper
172 172
     {
173 173
         $this->verifySSL = false;
174 174
         return $this;
175 175
     }
176 176
    
177
-   /**
178
-    * @var integer
179
-    */
177
+    /**
178
+     * @var integer
179
+     */
180 180
     protected $contentLength = 0;
181 181
 
182
-   /**
183
-    * Sends the POST request to the destination, and returns
184
-    * the response text.
185
-    *
186
-    * The response object is stored internally, so after calling
187
-    * this method it may be retrieved at any moment using the
188
-    * {@link getResponse()} method.
189
-    *
190
-    * @return string
191
-    * @see RequestHelper::getResponse()
192
-    * @throws RequestHelper_Exception
193
-    * 
194
-    * @see RequestHelper::ERROR_REQUEST_FAILED
195
-    */
182
+    /**
183
+     * Sends the POST request to the destination, and returns
184
+     * the response text.
185
+     *
186
+     * The response object is stored internally, so after calling
187
+     * this method it may be retrieved at any moment using the
188
+     * {@link getResponse()} method.
189
+     *
190
+     * @return string
191
+     * @see RequestHelper::getResponse()
192
+     * @throws RequestHelper_Exception
193
+     * 
194
+     * @see RequestHelper::ERROR_REQUEST_FAILED
195
+     */
196 196
     public function send() : string
197 197
     {
198 198
         $this->data = $this->boundaries->render();
@@ -232,14 +232,14 @@  discard block
 block discarded – undo
232 232
         return $this->data;
233 233
     }
234 234
     
235
-   /**
236
-    * Creates a new CURL resource configured according to the
237
-    * request's settings.
238
-    * 
239
-    * @param URLInfo $url
240
-    * @throws RequestHelper_Exception
241
-    * @return resource
242
-    */
235
+    /**
236
+     * Creates a new CURL resource configured according to the
237
+     * request's settings.
238
+     * 
239
+     * @param URLInfo $url
240
+     * @throws RequestHelper_Exception
241
+     * @return resource
242
+     */
243 243
     protected function createCURL(URLInfo $url)
244 244
     {
245 245
         $ch = curl_init();
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
         return $ch;
280 280
     }
281 281
 
282
-   /**
283
-    * Compiles the associative headers array into
284
-    * the format understood by CURL, namely an indexed
285
-    * array with one header string per entry.
286
-    * 
287
-    * @return array
288
-    */
282
+    /**
283
+     * Compiles the associative headers array into
284
+     * the format understood by CURL, namely an indexed
285
+     * array with one header string per entry.
286
+     * 
287
+     * @return array
288
+     */
289 289
     protected function renderHeaders() : array
290 290
     {
291 291
         $result = array();
@@ -297,12 +297,12 @@  discard block
 block discarded – undo
297 297
         return $result;
298 298
     }
299 299
     
300
-   /**
301
-    * Retrieves the raw response header, in the form of an indexed
302
-    * array containing all response header lines.
303
-    * 
304
-    * @return array
305
-    */
300
+    /**
301
+     * Retrieves the raw response header, in the form of an indexed
302
+     * array containing all response header lines.
303
+     * 
304
+     * @return array
305
+     */
306 306
     public function getResponseHeader() : array
307 307
     {
308 308
         $response = $this->getResponse();
Please login to merge, or discard this patch.
src/Traits/Classable.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -87,37 +87,37 @@
 block discarded – undo
87 87
  */
88 88
 interface Interface_Classable
89 89
 {
90
-   /**
91
-    * @param string $name
92
-    * @return Interface_Classable
93
-    */
90
+    /**
91
+     * @param string $name
92
+     * @return Interface_Classable
93
+     */
94 94
     public function addClass(string $name);
95 95
 
96
-   /**
97
-    * @param array $names
98
-    * @return Interface_Classable
99
-    */
96
+    /**
97
+     * @param array $names
98
+     * @return Interface_Classable
99
+     */
100 100
     public function addClasses(array $names);
101 101
     
102
-   /**
103
-    * @param string $name
104
-    * @return bool
105
-    */
102
+    /**
103
+     * @param string $name
104
+     * @return bool
105
+     */
106 106
     public function hasClass(string $name) : bool;
107 107
     
108
-   /**
109
-    * @param string $name
110
-    * @return Interface_Classable
111
-    */
108
+    /**
109
+     * @param string $name
110
+     * @return Interface_Classable
111
+     */
112 112
     public function removeClass(string $name);
113 113
     
114
-   /**
115
-    * @return array
116
-    */
114
+    /**
115
+     * @return array
116
+     */
117 117
     public function getClasses() : array;
118 118
     
119
-   /**
120
-    * @return string
121
-    */
119
+    /**
120
+     * @return string
121
+     */
122 122
     public function classesToString() : string;
123 123
 }
Please login to merge, or discard this patch.
src/ConvertHelper/StorageSizeEnum.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
     
32 32
     const BASE_2 = 1024;
33 33
     
34
-   /**
35
-    * @var ConvertHelper_StorageSizeEnum_Size[]
36
-    */
34
+    /**
35
+     * @var ConvertHelper_StorageSizeEnum_Size[]
36
+     */
37 37
     protected static $sizes = array();
38 38
     
39
-   /**
40
-    * Initializes the supported unit notations, and
41
-    * how they are supposed to be calculated.
42
-    *
43
-    * @see ConvertHelper_SizeNotation::parseSize()
44
-    */
39
+    /**
40
+     * Initializes the supported unit notations, and
41
+     * how they are supposed to be calculated.
42
+     *
43
+     * @see ConvertHelper_SizeNotation::parseSize()
44
+     */
45 45
     protected static function init() : void
46 46
     {
47 47
         if(!empty(self::$sizes)) {
@@ -68,30 +68,30 @@  discard block
 block discarded – undo
68 68
         }
69 69
     }
70 70
     
71
-   /**
72
-    * Called whenever the application locale is changed,
73
-    * to reset the size definitions so the labels get 
74
-    * translated to the new locale.
75
-    * 
76
-    * @param \AppLocalize\Localization_Event_LocaleChanged $event
77
-    */
71
+    /**
72
+     * Called whenever the application locale is changed,
73
+     * to reset the size definitions so the labels get 
74
+     * translated to the new locale.
75
+     * 
76
+     * @param \AppLocalize\Localization_Event_LocaleChanged $event
77
+     */
78 78
     public static function handle_localeChanged(\AppLocalize\Localization_Event_LocaleChanged $event) : void
79 79
     {
80 80
         self::$sizes = array();
81 81
     }
82 82
     
83
-   /**
84
-    * Adds a storage size to the internal collection.
85
-    * 
86
-    * @param string $name The lowercase size name, e.g. "kb", "mib"
87
-    * @param int $base This defines how many bytes there are in a kilobyte, to differentiate with the two common way to calculate sizes: base 10 or base 2. See the Wikipedia link for more details.
88
-    * @param int $exponent The multiplier of the base to get the byte value
89
-    * @param string $suffix The localized short suffix, e.g. "KB", "MiB"
90
-    * @param string $singular The localized singular label of the size, e.g. "Kilobyte".
91
-    * @param string $plural The localized plural label of the size, e.g. "Kilobytes".
92
-    * 
93
-    * @see https://en.m.wikipedia.org/wiki/Megabyte#Definitions
94
-    */
83
+    /**
84
+     * Adds a storage size to the internal collection.
85
+     * 
86
+     * @param string $name The lowercase size name, e.g. "kb", "mib"
87
+     * @param int $base This defines how many bytes there are in a kilobyte, to differentiate with the two common way to calculate sizes: base 10 or base 2. See the Wikipedia link for more details.
88
+     * @param int $exponent The multiplier of the base to get the byte value
89
+     * @param string $suffix The localized short suffix, e.g. "KB", "MiB"
90
+     * @param string $singular The localized singular label of the size, e.g. "Kilobyte".
91
+     * @param string $plural The localized plural label of the size, e.g. "Kilobytes".
92
+     * 
93
+     * @see https://en.m.wikipedia.org/wiki/Megabyte#Definitions
94
+     */
95 95
     protected static function addSize(string $name, int $base, int $exponent, string $suffix, string $singular, string $plural) : void
96 96
     {
97 97
         self::$sizes[$name] = new ConvertHelper_StorageSizeEnum_Size(
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
         );
105 105
     }
106 106
     
107
-   /**
108
-    * Retrieves all known sizes.
109
-    * 
110
-    * @return \AppUtils\ConvertHelper_StorageSizeEnum_Size[]
111
-    */
107
+    /**
108
+     * Retrieves all known sizes.
109
+     * 
110
+     * @return \AppUtils\ConvertHelper_StorageSizeEnum_Size[]
111
+     */
112 112
     public static function getSizes() : array
113 113
     {
114 114
         self::init();
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
         return self::$sizes;
117 117
     }
118 118
     
119
-   /**
120
-    * Retrieves a size definition instance by its name.
121
-    * 
122
-    * @param string $name Case insensitive. For example "kb", "MiB"...
123
-    * @throws ConvertHelper_Exception
124
-    * @return ConvertHelper_StorageSizeEnum_Size
125
-    * 
126
-    * @see ConvertHelper_StorageSizeEnum::ERROR_UNKNOWN_UNIT_NAME
127
-    */
119
+    /**
120
+     * Retrieves a size definition instance by its name.
121
+     * 
122
+     * @param string $name Case insensitive. For example "kb", "MiB"...
123
+     * @throws ConvertHelper_Exception
124
+     * @return ConvertHelper_StorageSizeEnum_Size
125
+     * 
126
+     * @see ConvertHelper_StorageSizeEnum::ERROR_UNKNOWN_UNIT_NAME
127
+     */
128 128
     public static function getSizeByName(string $name) : ConvertHelper_StorageSizeEnum_Size
129 129
     {
130 130
         self::init();
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
         );
147 147
     }
148 148
     
149
-   /**
150
-    * Retrieves a list of all size names, e.g. "mb", "kib" (lowercase).
151
-    * @return array
152
-    */
149
+    /**
150
+     * Retrieves a list of all size names, e.g. "mb", "kib" (lowercase).
151
+     * @return array
152
+     */
153 153
     public static function getSizeNames() : array
154 154
     {
155 155
         self::init();
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
         return array_keys(self::$sizes);
158 158
     }
159 159
    
160
-   /**
161
-    * Retrieves all available storage sizes for the specified
162
-    * base value.
163
-    * 
164
-    * @param int $base
165
-    * @return \AppUtils\ConvertHelper_StorageSizeEnum_Size[]
166
-    * 
167
-    * @see ConvertHelper_StorageSizeEnum::BASE_10
168
-    * @see ConvertHelper_StorageSizeEnum::BASE_2
169
-    */
160
+    /**
161
+     * Retrieves all available storage sizes for the specified
162
+     * base value.
163
+     * 
164
+     * @param int $base
165
+     * @return \AppUtils\ConvertHelper_StorageSizeEnum_Size[]
166
+     * 
167
+     * @see ConvertHelper_StorageSizeEnum::BASE_10
168
+     * @see ConvertHelper_StorageSizeEnum::BASE_2
169
+     */
170 170
     public static function getSizesByBase(int $base) : array
171 171
     {
172 172
         self::init();
Please login to merge, or discard this patch.