Passed
Push — master ( 420731...189c3f )
by Sebastian
02:15
created
examples/URLInfo/highlighting.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
  * @author Sebastian Mordziol <[email protected]>
8 8
  */
9 9
 
10
-   /**
11
-    * Examples environment config
12
-    */
10
+    /**
11
+     * Examples environment config
12
+     */
13 13
     require_once '../prepend.php';
14 14
 
15 15
     use function AppUtils\parseURL;
Please login to merge, or discard this patch.
examples/prepend.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,33 +17,33 @@
 block discarded – undo
17 17
         die('<b>ERROR:</b> Autoloader not present. Run composer update first.');
18 18
     }
19 19
     
20
-   /**
21
-    * The composer autoloader
22
-    */
20
+    /**
21
+     * The composer autoloader
22
+     */
23 23
     require_once $autoload;
24 24
 
25
-   /**
26
-    * Translation global function.
27
-    * @return string
28
-    */
25
+    /**
26
+     * Translation global function.
27
+     * @return string
28
+     */
29 29
     function t()
30 30
     {
31 31
         return call_user_func_array('\AppLocalize\t', func_get_args());
32 32
     }
33 33
     
34
-   /**
35
-    * Translation global function.
36
-    * @return string
37
-    */
34
+    /**
35
+     * Translation global function.
36
+     * @return string
37
+     */
38 38
     function pt()
39 39
     {
40 40
         return call_user_func_array('\AppLocalize\pt', func_get_args());
41 41
     }
42 42
     
43
-   /**
44
-    * Translation global function.
45
-    * @return string
46
-    */
43
+    /**
44
+     * Translation global function.
45
+     * @return string
46
+     */
47 47
     function pts()
48 48
     {
49 49
         return call_user_func_array('\AppLocalize\pts', func_get_args());
Please login to merge, or discard this patch.
src/CSVHelper.php 1 patch
Indentation   +130 added lines, -130 removed lines patch added patch discarded remove patch
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
         
51 51
     }
52 52
 
53
-   /**
54
-    * Creates and returns a new instance of the CSV builder which
55
-    * can be used to build CSV from scratch.
56
-    * 
57
-    * @return CSVHelper_Builder
58
-    */
53
+    /**
54
+     * Creates and returns a new instance of the CSV builder which
55
+     * can be used to build CSV from scratch.
56
+     * 
57
+     * @return CSVHelper_Builder
58
+     */
59 59
     public static function createBuilder()
60 60
     {
61 61
         return new CSVHelper_Builder();
62 62
     }
63 63
 
64
-   /**
65
-    * @var string
66
-    */
64
+    /**
65
+     * @var string
66
+     */
67 67
     protected $csv = '';
68 68
     
69 69
     protected $data = array();
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
     
73 73
     protected $headersPosition = self::HEADERS_NONE;
74 74
     
75
-   /**
76
-    * Loads CSV data from a string. 
77
-    * 
78
-    * Note: Use the {@link hasErrors()} method to 
79
-    * check if the string could be parsed correctly
80
-    * afterwards.
81
-    * 
82
-    * @param string $string
83
-    * @return CSVHelper
84
-    */
75
+    /**
76
+     * Loads CSV data from a string. 
77
+     * 
78
+     * Note: Use the {@link hasErrors()} method to 
79
+     * check if the string could be parsed correctly
80
+     * afterwards.
81
+     * 
82
+     * @param string $string
83
+     * @return CSVHelper
84
+     */
85 85
     public function loadString($string)
86 86
     {
87 87
         // remove any UTF byte order marks that may still be present in the string
@@ -95,20 +95,20 @@  discard block
 block discarded – undo
95 95
         return $this;
96 96
     }
97 97
     
98
-   /**
99
-    * Loads CSV data from a file.
100
-    * 
101
-    * Note: Use the {@link hasErrors()} method to 
102
-    * check if the string could be parsed correctly
103
-    * afterwards.
104
-    * 
105
-    * @param string $file
106
-    * @throws FileHelper_Exception
107
-    * @return CSVHelper
108
-    * 
109
-    * @see FileHelper::ERROR_FILE_DOES_NOT_EXIST
110
-    * @see FileHelper::ERROR_CANNOT_READ_FILE_CONTENTS
111
-    */
98
+    /**
99
+     * Loads CSV data from a file.
100
+     * 
101
+     * Note: Use the {@link hasErrors()} method to 
102
+     * check if the string could be parsed correctly
103
+     * afterwards.
104
+     * 
105
+     * @param string $file
106
+     * @throws FileHelper_Exception
107
+     * @return CSVHelper
108
+     * 
109
+     * @see FileHelper::ERROR_FILE_DOES_NOT_EXIST
110
+     * @see FileHelper::ERROR_CANNOT_READ_FILE_CONTENTS
111
+     */
112 112
     public function loadFile(string $file) : CSVHelper
113 113
     {
114 114
         $csv = FileHelper::readContents($file);
@@ -122,28 +122,28 @@  discard block
 block discarded – undo
122 122
     
123 123
     protected $rowCount = 0;
124 124
     
125
-   /**
126
-    * Specifies that headers are positioned on top, horizontally.
127
-    * @return CSVHelper
128
-    */
125
+    /**
126
+     * Specifies that headers are positioned on top, horizontally.
127
+     * @return CSVHelper
128
+     */
129 129
     public function setHeadersTop()
130 130
     {
131 131
         return $this->setHeadersPosition(self::HEADERS_TOP);
132 132
     }
133 133
     
134
-   /**
135
-    * Specifies that headers are positioned on the left, vertically.
136
-    * @return CSVHelper
137
-    */
134
+    /**
135
+     * Specifies that headers are positioned on the left, vertically.
136
+     * @return CSVHelper
137
+     */
138 138
     public function setHeadersLeft()
139 139
     {
140 140
         return $this->setHeadersPosition(self::HEADERS_LEFT);
141 141
     }
142 142
     
143
-   /**
144
-    * Specifies that there are no headers in the file (default).
145
-    * @return CSVHelper
146
-    */
143
+    /**
144
+     * Specifies that there are no headers in the file (default).
145
+     * @return CSVHelper
146
+     */
147 147
     public function setHeadersNone()
148 148
     {
149 149
         return $this->setHeadersPosition(self::HEADERS_NONE);
@@ -173,18 +173,18 @@  discard block
 block discarded – undo
173 173
         return false;
174 174
     }
175 175
     
176
-   /**
177
-    * Specifies where the headers are positioned in the
178
-    * CSV, or turns them off entirely. Use the class constants
179
-    * to ensure the value is correct.
180
-    * 
181
-    * @param string $position
182
-    * @throws CSVHelper_Exception
183
-    * @return CSVHelper
184
-    * @see CSVHelper::HEADERS_LEFT
185
-    * @see CSVHelper::HEADERS_TOP
186
-    * @see CSVHelper::HEADERS_NONE
187
-    */
176
+    /**
177
+     * Specifies where the headers are positioned in the
178
+     * CSV, or turns them off entirely. Use the class constants
179
+     * to ensure the value is correct.
180
+     * 
181
+     * @param string $position
182
+     * @throws CSVHelper_Exception
183
+     * @return CSVHelper
184
+     * @see CSVHelper::HEADERS_LEFT
185
+     * @see CSVHelper::HEADERS_TOP
186
+     * @see CSVHelper::HEADERS_NONE
187
+     */
188 188
     public function setHeadersPosition($position)
189 189
     {
190 190
         $validPositions = array(
@@ -211,13 +211,13 @@  discard block
 block discarded – undo
211 211
         return $this;
212 212
     }
213 213
     
214
-   /**
215
-    * Resets all internal data, allowing to start entirely anew
216
-    * with a new file, or to start building a new CSV file from
217
-    * scratch.
218
-    * 
219
-    * @return CSVHelper
220
-    */
214
+    /**
215
+     * Resets all internal data, allowing to start entirely anew
216
+     * with a new file, or to start building a new CSV file from
217
+     * scratch.
218
+     * 
219
+     * @return CSVHelper
220
+     */
221 221
     public function reset()
222 222
     {
223 223
         $this->data = array();
@@ -234,19 +234,19 @@  discard block
 block discarded – undo
234 234
         return $this->data;
235 235
     }
236 236
     
237
-   /**
238
-    * Retrieves the row at the specified index.
239
-    * If there is no data at the index, this will
240
-    * return an array populated with empty strings
241
-    * for all available columns.
242
-    * 
243
-    * Tip: Use the {@link rowExists()} method to check
244
-    * whether the specified row exists.
245
-    * 
246
-    * @param integer $index
247
-    * @return array()
248
-    * @see rowExists()
249
-    */
237
+    /**
238
+     * Retrieves the row at the specified index.
239
+     * If there is no data at the index, this will
240
+     * return an array populated with empty strings
241
+     * for all available columns.
242
+     * 
243
+     * Tip: Use the {@link rowExists()} method to check
244
+     * whether the specified row exists.
245
+     * 
246
+     * @param integer $index
247
+     * @return array()
248
+     * @see rowExists()
249
+     */
250 250
     public function getRow($index)
251 251
     {
252 252
         if(isset($this->data[$index])) {
@@ -256,63 +256,63 @@  discard block
 block discarded – undo
256 256
         return array_fill(0, $this->rowCount, '');
257 257
     }
258 258
     
259
-   /**
260
-    * Checks whether the specified row exists in the data set.
261
-    * @param integer $index
262
-    * @return boolean
263
-    */
259
+    /**
260
+     * Checks whether the specified row exists in the data set.
261
+     * @param integer $index
262
+     * @return boolean
263
+     */
264 264
     public function rowExists($index)
265 265
     {
266 266
         return isset($this->data[$index]);
267 267
     }
268 268
     
269
-   /**
270
-    * Counts the amount of rows in the parsed CSV,
271
-    * excluding the headers if any, depending on 
272
-    * their position.
273
-    * 
274
-    * @return integer
275
-    */
269
+    /**
270
+     * Counts the amount of rows in the parsed CSV,
271
+     * excluding the headers if any, depending on 
272
+     * their position.
273
+     * 
274
+     * @return integer
275
+     */
276 276
     public function countRows()
277 277
     {
278 278
         return $this->rowCount;
279 279
     }
280 280
     
281
-   /**
282
-    * Counts the amount of rows in the parsed CSV, 
283
-    * excluding the headers if any, depending on
284
-    * their position.
285
-    * 
286
-    * @return integer
287
-    */
281
+    /**
282
+     * Counts the amount of rows in the parsed CSV, 
283
+     * excluding the headers if any, depending on
284
+     * their position.
285
+     * 
286
+     * @return integer
287
+     */
288 288
     public function countColumns()
289 289
     {
290 290
         return $this->columnCount;
291 291
     }
292 292
     
293
-   /**
294
-    * Retrieves the headers, if any. Specify the position of the
295
-    * headers first to ensure this works correctly.
296
-    * 
297
-    * @return array Indexed array with header names.
298
-    */
293
+    /**
294
+     * Retrieves the headers, if any. Specify the position of the
295
+     * headers first to ensure this works correctly.
296
+     * 
297
+     * @return array Indexed array with header names.
298
+     */
299 299
     public function getHeaders()
300 300
     {
301 301
         return $this->headers;
302 302
     }
303 303
     
304
-   /**
305
-    * Retrieves the column at the specified index. If there
306
-    * is no column at the index, this returns an array
307
-    * populated with empty strings.
308
-    * 
309
-    * Tip: Use the {@link columnExists()} method to check
310
-    * whether a column exists.
311
-    * 
312
-    * @param integer $index
313
-    * @return string[]
314
-    * @see columnExists()
315
-    */
304
+    /**
305
+     * Retrieves the column at the specified index. If there
306
+     * is no column at the index, this returns an array
307
+     * populated with empty strings.
308
+     * 
309
+     * Tip: Use the {@link columnExists()} method to check
310
+     * whether a column exists.
311
+     * 
312
+     * @param integer $index
313
+     * @return string[]
314
+     * @see columnExists()
315
+     */
316 316
     public function getColumn($index)
317 317
     {
318 318
         $data = array();
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
         return $data;
329 329
     }
330 330
     
331
-   /**
332
-    * Checks whether the specified column exists in the data set.
333
-    * @param integer $index
334
-    * @return boolean
335
-    */
331
+    /**
332
+     * Checks whether the specified column exists in the data set.
333
+     * @param integer $index
334
+     * @return boolean
335
+     */
336 336
     public function columnExists($index)
337 337
     {
338 338
         if($index < $this->columnCount) {
@@ -396,22 +396,22 @@  discard block
 block discarded – undo
396 396
         }
397 397
     }
398 398
     
399
-   /**
400
-    * Checks whether any errors have been encountered
401
-    * while parsing the CSV.
402
-    * 
403
-    * @return boolean
404
-    * @see getErrorMessages()
405
-    */
399
+    /**
400
+     * Checks whether any errors have been encountered
401
+     * while parsing the CSV.
402
+     * 
403
+     * @return boolean
404
+     * @see getErrorMessages()
405
+     */
406 406
     public function hasErrors()
407 407
     {
408 408
         return !empty($this->errors);
409 409
     }
410 410
     
411
-   /**
412
-    * Retrieves all error messages.
413
-    * @return array
414
-    */
411
+    /**
412
+     * Retrieves all error messages.
413
+     * @return array
414
+     */
415 415
     public function getErrorMessages()
416 416
     {
417 417
         return $this->errors;
Please login to merge, or discard this patch.
src/ConvertHelper/ThrowableInfo.php 1 patch
Indentation   +103 added lines, -103 removed lines patch added patch discarded remove patch
@@ -14,49 +14,49 @@  discard block
 block discarded – undo
14 14
     const CONTEXT_COMMAND_LINE = 'cli';
15 15
     const CONTEXT_WEB = 'web';
16 16
     
17
-   /**
18
-    * @var \Throwable
19
-    */
17
+    /**
18
+     * @var \Throwable
19
+     */
20 20
     protected $exception;
21 21
     
22
-   /**
23
-    * @var ConvertHelper_ThrowableInfo_Call[]
24
-    */
22
+    /**
23
+     * @var ConvertHelper_ThrowableInfo_Call[]
24
+     */
25 25
     protected $calls = array();
26 26
     
27
-   /**
28
-    * @var integer
29
-    */
27
+    /**
28
+     * @var integer
29
+     */
30 30
     protected $code;
31 31
     
32
-   /**
33
-    * @var string
34
-    */
32
+    /**
33
+     * @var string
34
+     */
35 35
     protected $message;
36 36
     
37
-   /**
38
-    * @var integer
39
-    */
37
+    /**
38
+     * @var integer
39
+     */
40 40
     protected $callsCount = 0;
41 41
     
42
-   /**
43
-    * @var ConvertHelper_ThrowableInfo
44
-    */
42
+    /**
43
+     * @var ConvertHelper_ThrowableInfo
44
+     */
45 45
     protected $previous;
46 46
     
47
-   /**
48
-    * @var string
49
-    */
47
+    /**
48
+     * @var string
49
+     */
50 50
     protected $referer = '';
51 51
     
52
-   /**
53
-    * @var \DateTime
54
-    */
52
+    /**
53
+     * @var \DateTime
54
+     */
55 55
     protected $date;
56 56
     
57
-   /**
58
-    * @var string
59
-    */
57
+    /**
58
+     * @var string
59
+     */
60 60
     protected $context = self::CONTEXT_WEB;
61 61
     
62 62
     protected function __construct($subject)
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
         return isset($this->previous);
104 104
     }
105 105
     
106
-   /**
107
-    * Retrieves the information on the previous exception.
108
-    * 
109
-    * NOTE: Throws an exception if there is no previous 
110
-    * exception. Use hasPrevious() first to avoid this.
111
-    * 
112
-    * @throws ConvertHelper_Exception
113
-    * @return ConvertHelper_ThrowableInfo
114
-    * @see ConvertHelper_ThrowableInfo::ERROR_NO_PREVIOUS_EXCEPTION
115
-    */
106
+    /**
107
+     * Retrieves the information on the previous exception.
108
+     * 
109
+     * NOTE: Throws an exception if there is no previous 
110
+     * exception. Use hasPrevious() first to avoid this.
111
+     * 
112
+     * @throws ConvertHelper_Exception
113
+     * @return ConvertHelper_ThrowableInfo
114
+     * @see ConvertHelper_ThrowableInfo::ERROR_NO_PREVIOUS_EXCEPTION
115
+     */
116 116
     public function getPrevious() : ConvertHelper_ThrowableInfo
117 117
     {
118 118
         if(isset($this->previous)) {
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
         return !empty($this->code);
132 132
     }
133 133
     
134
-   /**
135
-    * Improved textonly exception trace.
136
-    */
134
+    /**
135
+     * Improved textonly exception trace.
136
+     */
137 137
     public function toString() : string
138 138
     {
139 139
         $calls = $this->getCalls();
@@ -161,73 +161,73 @@  discard block
 block discarded – undo
161 161
         return $string;
162 162
     }
163 163
     
164
-   /**
165
-    * Retrieves the URL of the page in which the exception
166
-    * was thrown, if applicable: in CLI context, this will
167
-    * return an empty string.
168
-    * 
169
-    * @return string
170
-    */
164
+    /**
165
+     * Retrieves the URL of the page in which the exception
166
+     * was thrown, if applicable: in CLI context, this will
167
+     * return an empty string.
168
+     * 
169
+     * @return string
170
+     */
171 171
     public function getReferer() : string
172 172
     {
173 173
         return $this->referer;
174 174
     }
175 175
     
176
-   /**
177
-    * Whether the exception occurred in a command line context.
178
-    * @return bool
179
-    */
176
+    /**
177
+     * Whether the exception occurred in a command line context.
178
+     * @return bool
179
+     */
180 180
     public function isCommandLine() : bool
181 181
     {
182 182
         return $this->getContext() === self::CONTEXT_COMMAND_LINE;
183 183
     }
184 184
     
185
-   /**
186
-    * Whether the exception occurred during an http request.
187
-    * @return bool
188
-    */
185
+    /**
186
+     * Whether the exception occurred during an http request.
187
+     * @return bool
188
+     */
189 189
     public function isWebRequest() : bool
190 190
     {
191 191
         return $this->getContext() === self::CONTEXT_WEB;
192 192
     }
193 193
     
194
-   /**
195
-    * Retrieves the context identifier, i.e. if the exception
196
-    * occurred in a command line context or regular web request.
197
-    * 
198
-    * @return string
199
-    * 
200
-    * @see ConvertHelper_ThrowableInfo::isCommandLine()
201
-    * @see ConvertHelper_ThrowableInfo::isWebRequest()
202
-    * @see ConvertHelper_ThrowableInfo::CONTEXT_COMMAND_LINE
203
-    * @see ConvertHelper_ThrowableInfo::CONTEXT_WEB
204
-    */
194
+    /**
195
+     * Retrieves the context identifier, i.e. if the exception
196
+     * occurred in a command line context or regular web request.
197
+     * 
198
+     * @return string
199
+     * 
200
+     * @see ConvertHelper_ThrowableInfo::isCommandLine()
201
+     * @see ConvertHelper_ThrowableInfo::isWebRequest()
202
+     * @see ConvertHelper_ThrowableInfo::CONTEXT_COMMAND_LINE
203
+     * @see ConvertHelper_ThrowableInfo::CONTEXT_WEB
204
+     */
205 205
     public function getContext() : string
206 206
     {
207 207
         return $this->context;
208 208
     }
209 209
     
210
-   /**
211
-    * Retrieves the date of the exception, and approximate time:
212
-    * since exceptions do not store time, this is captured the 
213
-    * moment the ThrowableInfo is created.
214
-    * 
215
-    * @return \DateTime
216
-    */
210
+    /**
211
+     * Retrieves the date of the exception, and approximate time:
212
+     * since exceptions do not store time, this is captured the 
213
+     * moment the ThrowableInfo is created.
214
+     * 
215
+     * @return \DateTime
216
+     */
217 217
     public function getDate() : \DateTime
218 218
     {
219 219
         return $this->date;
220 220
     }
221 221
     
222
-   /**
223
-    * Serializes all information on the exception to an
224
-    * associative array. This can be saved (file, database, 
225
-    * session...), and later be restored into a throwable
226
-    * info instance using the fromSerialized() method.
227
-    * 
228
-    * @return array
229
-    * @see ConvertHelper_ThrowableInfo::fromSerialized()
230
-    */
222
+    /**
223
+     * Serializes all information on the exception to an
224
+     * associative array. This can be saved (file, database, 
225
+     * session...), and later be restored into a throwable
226
+     * info instance using the fromSerialized() method.
227
+     * 
228
+     * @return array
229
+     * @see ConvertHelper_ThrowableInfo::fromSerialized()
230
+     */
231 231
     public function serialize() : array
232 232
     {
233 233
         $result = array(
@@ -254,24 +254,24 @@  discard block
 block discarded – undo
254 254
         return $result;
255 255
     }
256 256
 
257
-   /**
258
-    * Sets the maximum folder depth to show in the 
259
-    * file paths, to avoid them being too long.
260
-    * 
261
-    * @param int $depth
262
-    * @return ConvertHelper_ThrowableInfo
263
-    */
257
+    /**
258
+     * Sets the maximum folder depth to show in the 
259
+     * file paths, to avoid them being too long.
260
+     * 
261
+     * @param int $depth
262
+     * @return ConvertHelper_ThrowableInfo
263
+     */
264 264
     public function setFolderDepth(int $depth) : ConvertHelper_ThrowableInfo
265 265
     {
266 266
         return $this->setOption('folder-depth', $depth);
267 267
     }
268 268
     
269
-   /**
270
-    * Retrieves the current folder depth option value.
271
-    * 
272
-    * @return int
273
-    * @see ConvertHelper_ThrowableInfo::setFolderDepth()
274
-    */
269
+    /**
270
+     * Retrieves the current folder depth option value.
271
+     * 
272
+     * @return int
273
+     * @see ConvertHelper_ThrowableInfo::setFolderDepth()
274
+     */
275 275
     public function getFolderDepth() : int
276 276
     {
277 277
         $depth = $this->getOption('folder-depth');
@@ -282,19 +282,19 @@  discard block
 block discarded – undo
282 282
         return 2;
283 283
     }
284 284
     
285
-   /**
286
-    * Retrieves all function calls that led to the error.
287
-    * @return ConvertHelper_ThrowableInfo_Call[]
288
-    */
285
+    /**
286
+     * Retrieves all function calls that led to the error.
287
+     * @return ConvertHelper_ThrowableInfo_Call[]
288
+     */
289 289
     public function getCalls()
290 290
     {
291 291
         return $this->calls;
292 292
     }
293 293
     
294
-   /**
295
-    * Returns the amount of function and method calls in the stack trace.
296
-    * @return int
297
-    */
294
+    /**
295
+     * Returns the amount of function and method calls in the stack trace.
296
+     * @return int
297
+     */
298 298
     public function countCalls() : int
299 299
     {
300 300
         return $this->callsCount;
Please login to merge, or discard this patch.
src/ConvertHelper/EOL.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
     const TYPE_LF = 'LF';
30 30
     const TYPE_CR = 'CR';
31 31
     
32
-   /**
33
-    * @var string
34
-    */
32
+    /**
33
+     * @var string
34
+     */
35 35
     protected $char;
36 36
     
37
-   /**
38
-    * @var string
39
-    */
37
+    /**
38
+     * @var string
39
+     */
40 40
     protected $type;
41 41
     
42
-   /**
43
-    * @var string
44
-    */
42
+    /**
43
+     * @var string
44
+     */
45 45
     protected $description;
46 46
     
47 47
     public function __construct(string $char, string $type, string $description)
@@ -51,33 +51,33 @@  discard block
 block discarded – undo
51 51
         $this->description = $description;
52 52
     }
53 53
     
54
-   /**
55
-    * The actual EOL character.
56
-    * @return string
57
-    */
54
+    /**
55
+     * The actual EOL character.
56
+     * @return string
57
+     */
58 58
     public function getCharacter() : string
59 59
     {
60 60
         return $this->char;
61 61
     }
62 62
     
63
-   /**
64
-    * A more detailed, human readable description of the character.
65
-    * @return string
66
-    */
63
+    /**
64
+     * A more detailed, human readable description of the character.
65
+     * @return string
66
+     */
67 67
     public function getDescription() : string
68 68
     {
69 69
         return $this->description;
70 70
     }
71 71
     
72
-   /**
73
-    * The EOL character type, e.g. "CR+LF", "CR"...
74
-    * @return string
75
-    * 
76
-    * @see ConvertHelper_EOL::TYPE_CR
77
-    * @see ConvertHelper_EOL::TYPE_CRLF
78
-    * @see ConvertHelper_EOL::TYPE_LF
79
-    * @see ConvertHelper_EOL::TYPE_LFCR
80
-    */
72
+    /**
73
+     * The EOL character type, e.g. "CR+LF", "CR"...
74
+     * @return string
75
+     * 
76
+     * @see ConvertHelper_EOL::TYPE_CR
77
+     * @see ConvertHelper_EOL::TYPE_CRLF
78
+     * @see ConvertHelper_EOL::TYPE_LF
79
+     * @see ConvertHelper_EOL::TYPE_LFCR
80
+     */
81 81
     public function getType() : string
82 82
     {
83 83
         return $this->type;
Please login to merge, or discard this patch.
src/FileHelper/FileFinder.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
     
32 32
     const PATH_MODE_STRIP = 'strip';
33 33
     
34
-   /**
35
-    * @var string
36
-    */
34
+    /**
35
+     * @var string
36
+     */
37 37
     protected $path;
38 38
     
39 39
     public function __construct(string $path)
Please login to merge, or discard this patch.
src/IniHelper.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -60,23 +60,23 @@  discard block
 block discarded – undo
60 60
         }
61 61
     }
62 62
     
63
-   /**
64
-    * The end of line character used in the INI source string.
65
-    * @return string
66
-    */
63
+    /**
64
+     * The end of line character used in the INI source string.
65
+     * @return string
66
+     */
67 67
     public function getEOLChar() : string
68 68
     {
69 69
         return $this->eol;
70 70
     }
71 71
     
72
-   /**
73
-    * Factory method: creates a new helper instance loading the
74
-    * ini content from the specified file.
75
-    * 
76
-    * @param string $iniPath
77
-    * @throws IniHelper_Exception
78
-    * @return \AppUtils\IniHelper
79
-    */
72
+    /**
73
+     * Factory method: creates a new helper instance loading the
74
+     * ini content from the specified file.
75
+     * 
76
+     * @param string $iniPath
77
+     * @throws IniHelper_Exception
78
+     * @return \AppUtils\IniHelper
79
+     */
80 80
     public static function createFromFile(string $iniPath)
81 81
     {
82 82
         $iniPath = FileHelper::requireFileExists($iniPath);
@@ -96,35 +96,35 @@  discard block
 block discarded – undo
96 96
         );
97 97
     }
98 98
     
99
-   /**
100
-    * Factory method: Creates a new ini helper instance from an ini string.
101
-    * 
102
-    * @param string $iniContent
103
-    * @return \AppUtils\IniHelper
104
-    */
99
+    /**
100
+     * Factory method: Creates a new ini helper instance from an ini string.
101
+     * 
102
+     * @param string $iniContent
103
+     * @return \AppUtils\IniHelper
104
+     */
105 105
     public static function createFromString(string $iniContent)
106 106
     {
107 107
         return new IniHelper($iniContent);
108 108
     }
109 109
     
110
-   /**
111
-    * Factory method: Creates a new empty ini helper.
112
-    *  
113
-    * @return \AppUtils\IniHelper
114
-    */
110
+    /**
111
+     * Factory method: Creates a new empty ini helper.
112
+     *  
113
+     * @return \AppUtils\IniHelper
114
+     */
115 115
     public static function createNew()
116 116
     {
117 117
         return self::createFromString('');
118 118
     }
119 119
     
120
-   /**
121
-    * Adds a new data section, and returns the section instance.
122
-    * If a section with the name already exists, returns that
123
-    * section instead of creating a new one.
124
-    *  
125
-    * @param string $name
126
-    * @return IniHelper_Section
127
-    */
120
+    /**
121
+     * Adds a new data section, and returns the section instance.
122
+     * If a section with the name already exists, returns that
123
+     * section instead of creating a new one.
124
+     *  
125
+     * @param string $name
126
+     * @return IniHelper_Section
127
+     */
128 128
     public function addSection(string $name) : IniHelper_Section
129 129
     {
130 130
         if(!isset($this->sections[$name])) {
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
         return $this->sections[$name];
135 135
     }
136 136
     
137
-   /**
138
-    * Retrieves a section by its name, if it exists.
139
-    * 
140
-    * @param string $name
141
-    * @return IniHelper_Section|NULL
142
-    */
137
+    /**
138
+     * Retrieves a section by its name, if it exists.
139
+     * 
140
+     * @param string $name
141
+     * @return IniHelper_Section|NULL
142
+     */
143 143
     public function getSection(string $name) : ?IniHelper_Section
144 144
     {
145 145
         if(isset($this->sections[$name])) {
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
         return null;
150 150
     }
151 151
     
152
-   /**
153
-    * Gets the data from the INI file as an associative array.
154
-    * 
155
-    * @return array
156
-    */
152
+    /**
153
+     * Gets the data from the INI file as an associative array.
154
+     * 
155
+     * @return array
156
+     */
157 157
     public function toArray() : array
158 158
     {
159 159
         $result = array();
@@ -173,17 +173,17 @@  discard block
 block discarded – undo
173 173
         return $result;
174 174
     }
175 175
     
176
-   /**
177
-    * Saves the INI content to the target file.
178
-    * 
179
-    * @param string $filePath
180
-    * @return IniHelper
181
-    * @throws FileHelper_Exception
182
-    * 
183
-    * @see FileHelper::ERROR_SAVE_FOLDER_NOT_WRITABLE
184
-    * @see FileHelper::ERROR_SAVE_FILE_NOT_WRITABLE
185
-    * @see FileHelper::ERROR_SAVE_FILE_WRITE_FAILED
186
-    */
176
+    /**
177
+     * Saves the INI content to the target file.
178
+     * 
179
+     * @param string $filePath
180
+     * @return IniHelper
181
+     * @throws FileHelper_Exception
182
+     * 
183
+     * @see FileHelper::ERROR_SAVE_FOLDER_NOT_WRITABLE
184
+     * @see FileHelper::ERROR_SAVE_FILE_NOT_WRITABLE
185
+     * @see FileHelper::ERROR_SAVE_FILE_WRITE_FAILED
186
+     */
187 187
     public function saveToFile(string $filePath) : IniHelper
188 188
     {
189 189
         FileHelper::saveFile($filePath, $this->saveToString());
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
         return $this;
192 192
     }
193 193
     
194
-   /**
195
-    * Returns the INI content as string.
196
-    * 
197
-    * @return string
198
-    */
194
+    /**
195
+     * Returns the INI content as string.
196
+     * 
197
+     * @return string
198
+     */
199 199
     public function saveToString() : string
200 200
     {
201 201
         $parts = array();
@@ -208,15 +208,15 @@  discard block
 block discarded – undo
208 208
         return implode($this->eol, $parts);
209 209
     }
210 210
     
211
-   /**
212
-    * Sets or adds the value of a setting in the INI content.
213
-    * If the setting does not exist, it is added. Otherwise,
214
-    * the existing value is overwritten.
215
-    * 
216
-    * @param string $path A variable path, either <code>varname</code> or <code>section.varname</code>.
217
-    * @param mixed $value
218
-    * @return IniHelper
219
-    */
211
+    /**
212
+     * Sets or adds the value of a setting in the INI content.
213
+     * If the setting does not exist, it is added. Otherwise,
214
+     * the existing value is overwritten.
215
+     * 
216
+     * @param string $path A variable path, either <code>varname</code> or <code>section.varname</code>.
217
+     * @param mixed $value
218
+     * @return IniHelper
219
+     */
220 220
     public function setValue(string $path, $value) : IniHelper
221 221
     {
222 222
         $path = $this->parsePath($path);
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
         return $this;
236 236
     }
237 237
     
238
-   /**
239
-    * Checks whether a section with the specified name exists.
240
-    * 
241
-    * @param string $name
242
-    * @return bool
243
-    */
238
+    /**
239
+     * Checks whether a section with the specified name exists.
240
+     * 
241
+     * @param string $name
242
+     * @return bool
243
+     */
244 244
     public function sectionExists(string $name) : bool
245 245
     {
246 246
         foreach($this->sections as $section) {
@@ -252,23 +252,23 @@  discard block
 block discarded – undo
252 252
         return false;
253 253
     }
254 254
     
255
-   /**
256
-    * Retrieves the default section, which is used to add
257
-    * values in the root of the document.
258
-    * 
259
-    * @return IniHelper_Section
260
-    */
255
+    /**
256
+     * Retrieves the default section, which is used to add
257
+     * values in the root of the document.
258
+     * 
259
+     * @return IniHelper_Section
260
+     */
261 261
     public function getDefaultSection() : IniHelper_Section
262 262
     {
263 263
         return $this->addSection(self::SECTION_DEFAULT);
264 264
     }
265 265
     
266
-   /**
267
-    * Retrieves all variable lines for the specified path.
268
-    * 
269
-    * @param string $path A variable path. Either <code>varname</code> or <code>section.varname</code>.
270
-    * @return array|\AppUtils\IniHelper_Line[]
271
-    */
266
+    /**
267
+     * Retrieves all variable lines for the specified path.
268
+     * 
269
+     * @param string $path A variable path. Either <code>varname</code> or <code>section.varname</code>.
270
+     * @return array|\AppUtils\IniHelper_Line[]
271
+     */
272 272
     public function getLinesByVariable(string $path)
273 273
     {
274 274
         $path = $this->parsePath($path);
Please login to merge, or discard this patch.
src/SVNHelper.php 1 patch
Indentation   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -23,91 +23,91 @@  discard block
 block discarded – undo
23 23
  */
24 24
 class SVNHelper
25 25
 {
26
-   /**
27
-    * @var integer
28
-    */
26
+    /**
27
+     * @var integer
28
+     */
29 29
     const ERROR_LOCAL_PATH_DOES_NOT_EXIST = 22401;
30 30
     
31
-   /**
32
-    * @var integer
33
-    */
31
+    /**
32
+     * @var integer
33
+     */
34 34
     const ERROR_INVALID_REP_URL = 22402;
35 35
     
36
-   /**
37
-    * @var integer
38
-    */
36
+    /**
37
+     * @var integer
38
+     */
39 39
     const ERROR_PATH_IS_OUTSIDE_REPOSITORY = 22403;
40 40
     
41
-   /**
42
-    * @var integer
43
-    */
41
+    /**
42
+     * @var integer
43
+     */
44 44
     const ERROR_TARGET_FOLDER_IS_A_FILE = 22404;
45 45
     
46
-   /**
47
-    * @var integer
48
-    */
46
+    /**
47
+     * @var integer
48
+     */
49 49
     const ERROR_CANNOT_ADD_INEXISTENT_FILE = 22405;
50 50
     
51
-   /**
52
-    * @var integer
53
-    */
51
+    /**
52
+     * @var integer
53
+     */
54 54
     const ERROR_TARGET_PATH_NOT_FOUND = 22406;
55 55
     
56
-   /**
57
-    * @var integer
58
-    */
56
+    /**
57
+     * @var integer
58
+     */
59 59
     const ERROR_INVALID_TARGET_TYPE = 22407;
60 60
     
61
-   /**
62
-    * @var SVNHelper_Target_Folder
63
-    */
61
+    /**
62
+     * @var SVNHelper_Target_Folder
63
+     */
64 64
     protected $target;
65 65
     
66
-   /**
67
-    * @var string
68
-    */
66
+    /**
67
+     * @var string
68
+     */
69 69
     protected $path;
70 70
     
71
-   /**
72
-    * @var string
73
-    */
71
+    /**
72
+     * @var string
73
+     */
74 74
     protected $url;
75 75
     
76
-   /**
77
-    * @var string
78
-    */
76
+    /**
77
+     * @var string
78
+     */
79 79
     protected $user;
80 80
     
81
-   /**
82
-    * @var string
83
-    */
81
+    /**
82
+     * @var string
83
+     */
84 84
     protected $pass;
85 85
     
86
-   /**
87
-    * @var array
88
-    */
86
+    /**
87
+     * @var array
88
+     */
89 89
     protected $options = array(
90 90
         'binaries-path' => ''
91 91
     );
92 92
     
93
-   /**
94
-    * @var boolean
95
-    */
93
+    /**
94
+     * @var boolean
95
+     */
96 96
     protected $isWindows = false;
97 97
     
98
-   /**
99
-    * @var array
100
-    */
98
+    /**
99
+     * @var array
100
+     */
101 101
     protected $normalize = array(
102 102
         'from' => '\\',
103 103
         'to' => '/'
104 104
     );
105 105
     
106
-   /**
107
-    * @param string $repPath The path to the repository
108
-    * @param string $repURL The SVN URL to the repository
109
-    * @throws SVNHelper_Exception
110
-    */
106
+    /**
107
+     * @param string $repPath The path to the repository
108
+     * @param string $repURL The SVN URL to the repository
109
+     * @throws SVNHelper_Exception
110
+     */
111 111
     public function __construct(string $repPath, string $repURL)
112 112
     {
113 113
         $this->isWindows = substr(PHP_OS, 0, 3) == 'WIN';
@@ -168,16 +168,16 @@  discard block
 block discarded – undo
168 168
         return $this->pass;
169 169
     }
170 170
     
171
-   /**
172
-    * Normalizes slashes in the path according to the
173
-    * operating system, i.e. forward slashes for NIX-systems
174
-    * and backward slashes for Windows.
175
-    *
176
-    * @param string $path An absolute path to normalize
177
-    * @param bool $relativize Whether to return a path relative to the repository
178
-    * @throws SVNHelper_Exception
179
-    * @return string
180
-    */
171
+    /**
172
+     * Normalizes slashes in the path according to the
173
+     * operating system, i.e. forward slashes for NIX-systems
174
+     * and backward slashes for Windows.
175
+     *
176
+     * @param string $path An absolute path to normalize
177
+     * @param bool $relativize Whether to return a path relative to the repository
178
+     * @throws SVNHelper_Exception
179
+     * @return string
180
+     */
181 181
     public function normalizePath($path, $relativize=false)
182 182
     {
183 183
         if(empty($path)) {
@@ -212,32 +212,32 @@  discard block
 block discarded – undo
212 212
         );
213 213
     }
214 214
     
215
-   /**
216
-    * Retrieves the path slash style according to the
217
-    * current operating system.
218
-    * 
219
-    * @return string
220
-    */
215
+    /**
216
+     * Retrieves the path slash style according to the
217
+     * current operating system.
218
+     * 
219
+     * @return string
220
+     */
221 221
     public function getSlash()
222 222
     {
223 223
         return $this->normalize['to'];
224 224
     }
225 225
     
226
-   /**
227
-    * Keeps instances of files.
228
-    * @var SVNHelper_Target[]
229
-    */
226
+    /**
227
+     * Keeps instances of files.
228
+     * @var SVNHelper_Target[]
229
+     */
230 230
     protected $targets = array();
231 231
     
232
-   /**
233
-    * Retrieves a file instance from the SVN repository:
234
-    * this allows all possible operations on the file as
235
-    * well as accessing more information on it.
236
-    * 
237
-    * @param string $path A path to the file, relative to the repository path or absolute.
238
-    * @return SVNHelper_Target_File
239
-    * @throws SVNHelper_Exception
240
-    */
232
+    /**
233
+     * Retrieves a file instance from the SVN repository:
234
+     * this allows all possible operations on the file as
235
+     * well as accessing more information on it.
236
+     * 
237
+     * @param string $path A path to the file, relative to the repository path or absolute.
238
+     * @return SVNHelper_Target_File
239
+     * @throws SVNHelper_Exception
240
+     */
241 241
     public function getFile($path)
242 242
     {
243 243
         $path = $this->filterPath($path);
@@ -245,15 +245,15 @@  discard block
 block discarded – undo
245 245
         return $this->getTarget('File', $this->relativizePath($path));
246 246
     }
247 247
 
248
-   /**
249
-    * Retrieves a folder instance from the SVN repository:
250
-    * This allows all possible operations on the folder as
251
-    * well as accessing more information on it.
252
-    * 
253
-    * @param string $path
254
-    * @return SVNHelper_Target_Folder
255
-    * @throws SVNHelper_Exception
256
-    */
248
+    /**
249
+     * Retrieves a folder instance from the SVN repository:
250
+     * This allows all possible operations on the folder as
251
+     * well as accessing more information on it.
252
+     * 
253
+     * @param string $path
254
+     * @return SVNHelper_Target_Folder
255
+     * @throws SVNHelper_Exception
256
+     */
257 257
     public function getFolder($path)
258 258
     {
259 259
         $path = $this->filterPath($path);
@@ -261,13 +261,13 @@  discard block
 block discarded – undo
261 261
         return $this->getTarget('Folder', $this->relativizePath($path));
262 262
     }
263 263
     
264
-   /**
265
-    * Passes the path through realpath and ensures it exists.
266
-    *
267
-    * @param string $path
268
-    * @throws SVNHelper_Exception
269
-    * @return string
270
-    */
264
+    /**
265
+     * Passes the path through realpath and ensures it exists.
266
+     *
267
+     * @param string $path
268
+     * @throws SVNHelper_Exception
269
+     * @return string
270
+     */
271 271
     protected function filterPath($path)
272 272
     {
273 273
         if(empty($path)) {
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
         );
293 293
     }
294 294
     
295
-   /**
296
-    * Retrieves a target file or folder within the repository.
297
-    *
298
-    * @param string $type The target type, "File" or "Folder".
299
-    * @param string $relativePath A path relative to the root folder.
300
-    * @return SVNHelper_Target
301
-    */
295
+    /**
296
+     * Retrieves a target file or folder within the repository.
297
+     *
298
+     * @param string $type The target type, "File" or "Folder".
299
+     * @param string $relativePath A path relative to the root folder.
300
+     * @return SVNHelper_Target
301
+     */
302 302
     protected function getTarget($type, $relativePath)
303 303
     {
304 304
         $key = $type.':'.$relativePath;
@@ -346,33 +346,33 @@  discard block
 block discarded – undo
346 346
         return $this->url;
347 347
     }
348 348
     
349
-   /**
350
-    * Updates the whole SVN repository from the root folder.
351
-    * @return SVNHelper_CommandResult
352
-    */
349
+    /**
350
+     * Updates the whole SVN repository from the root folder.
351
+     * @return SVNHelper_CommandResult
352
+     */
353 353
     public function runUpdate()
354 354
     {
355 355
         return $this->createUpdate($this->target)->execute();
356 356
     }
357 357
     
358
-   /**
359
-    * Creates an update command for the target file or folder.
360
-    * This can be configured further before it is executed.
361
-    * 
362
-    * @param SVNHelper_Target $target
363
-    * @return SVNHelper_Command_Update
364
-    */
358
+    /**
359
+     * Creates an update command for the target file or folder.
360
+     * This can be configured further before it is executed.
361
+     * 
362
+     * @param SVNHelper_Target $target
363
+     * @return SVNHelper_Command_Update
364
+     */
365 365
     public function createUpdate(SVNHelper_Target $target)
366 366
     {
367 367
         return $this->createCommand('Update', $target);
368 368
     }
369 369
     
370
-   /**
371
-    * Creates an add command for the targt file or folder.
372
-    * 
373
-    * @param SVNHelper_Target $target
374
-    * @return SVNHelper_Command_Add
375
-    */
370
+    /**
371
+     * Creates an add command for the targt file or folder.
372
+     * 
373
+     * @param SVNHelper_Target $target
374
+     * @return SVNHelper_Command_Add
375
+     */
376 376
     public function createAdd(SVNHelper_Target $target)
377 377
     {
378 378
         return $this->createCommand('Add', $target);
@@ -389,12 +389,12 @@  discard block
 block discarded – undo
389 389
         return $this->createCommand('Info', $target);
390 390
     }
391 391
     
392
-   /**
393
-    * Creates a status command for the target file or folder.
394
-    * 
395
-    * @param SVNHelper_Target $target
396
-    * @return SVNHelper_Command_Status
397
-    */
392
+    /**
393
+     * Creates a status command for the target file or folder.
394
+     * 
395
+     * @param SVNHelper_Target $target
396
+     * @return SVNHelper_Command_Status
397
+     */
398 398
     public function createStatus(SVNHelper_Target $target)
399 399
     {
400 400
         return $this->createCommand('Status', $target);
@@ -419,28 +419,28 @@  discard block
 block discarded – undo
419 419
         return $cmd;
420 420
     }
421 421
     
422
-   /**
423
-    * Creates a path relative to the repository for the target
424
-    * file or folder, from an absolute path.
425
-    *
426
-    * @param string $path An absolute path.
427
-    * @return string
428
-    */
422
+    /**
423
+     * Creates a path relative to the repository for the target
424
+     * file or folder, from an absolute path.
425
+     *
426
+     * @param string $path An absolute path.
427
+     * @return string
428
+     */
429 429
     public function relativizePath($path)
430 430
     {
431 431
         return $this->normalizePath($path, true);
432 432
     }
433 433
     
434
-   /**
435
-    * Adds a folder: creates it as necessary (recursive),
436
-    * and adds it to be committed if it is not versioned yet.
437
-    * Use this instead of {@link getFolder()} when you are
438
-    * not sure that it exists yet, and will need it.
439
-    * 
440
-    * @param string $path Absolute or relative path to the folder
441
-    * @throws SVNHelper_Exception
442
-    * @return SVNHelper_Target_Folder
443
-    */
434
+    /**
435
+     * Adds a folder: creates it as necessary (recursive),
436
+     * and adds it to be committed if it is not versioned yet.
437
+     * Use this instead of {@link getFolder()} when you are
438
+     * not sure that it exists yet, and will need it.
439
+     * 
440
+     * @param string $path Absolute or relative path to the folder
441
+     * @throws SVNHelper_Exception
442
+     * @return SVNHelper_Target_Folder
443
+     */
444 444
     public function addFolder($path)
445 445
     {
446 446
         if(is_dir($path)) {
@@ -490,14 +490,14 @@  discard block
 block discarded – undo
490 490
     
491 491
     protected static $logCallback;
492 492
 
493
-   /**
494
-    * Sets the callback function/method to use for
495
-    * SVH helper log messages. This gets the message
496
-    * and the SVNHelper instance as parameters.
497
-    * 
498
-    * @param callable $callback
499
-    * @throws SVNHelper_Exception
500
-    */
493
+    /**
494
+     * Sets the callback function/method to use for
495
+     * SVH helper log messages. This gets the message
496
+     * and the SVNHelper instance as parameters.
497
+     * 
498
+     * @param callable $callback
499
+     * @throws SVNHelper_Exception
500
+     */
501 501
     public static function setLogCallback($callback)
502 502
     {
503 503
         if(!is_callable($callback)) {
@@ -518,22 +518,22 @@  discard block
 block discarded – undo
518 518
         }
519 519
     }
520 520
 
521
-   /**
522
-    * Retrieves information about the file, and adds it
523
-    * to be committed later if it not versioned yet. 
524
-    * 
525
-    * @param string $path
526
-    * @return SVNHelper_Target_File
527
-    */
521
+    /**
522
+     * Retrieves information about the file, and adds it
523
+     * to be committed later if it not versioned yet. 
524
+     * 
525
+     * @param string $path
526
+     * @return SVNHelper_Target_File
527
+     */
528 528
     public function addFile($path)
529 529
     {
530 530
         return $this->getFile($path)->runAdd();        
531 531
     }
532 532
     
533
-   /**
534
-    * Commits all changes in the repository.
535
-    * @param string $message The commit message to log.
536
-    */
533
+    /**
534
+     * Commits all changes in the repository.
535
+     * @param string $message The commit message to log.
536
+     */
537 537
     public function runCommit($message)
538 538
     {
539 539
         $this->createCommit($this->getFolder($this->path), $message)->execute();
Please login to merge, or discard this patch.
src/VariableInfo.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -32,25 +32,25 @@  discard block
 block discarded – undo
32 32
         self::TYPE_CALLABLE => 'cf5e20'
33 33
     );
34 34
     
35
-   /**
36
-    * @var string
37
-    */
35
+    /**
36
+     * @var string
37
+     */
38 38
     protected $string;
39 39
     
40
-   /**
41
-    * @var mixed
42
-    */
40
+    /**
41
+     * @var mixed
42
+     */
43 43
     protected $value;
44 44
     
45
-   /**
46
-    * @var string
47
-    */
45
+    /**
46
+     * @var string
47
+     */
48 48
     protected $type;
49 49
     
50
-   /**
51
-    * @param mixed $value
52
-    * @param array|null $serialized
53
-    */
50
+    /**
51
+     * @param mixed $value
52
+     * @param array|null $serialized
53
+     */
54 54
     public function __construct($value, $serialized=null)
55 55
     {
56 56
         if(is_array($serialized))
@@ -63,26 +63,26 @@  discard block
 block discarded – undo
63 63
         }
64 64
     }
65 65
     
66
-   /**
67
-    * Creates a new variable info instance from a PHP variable
68
-    * of any type.
69
-    * 
70
-    * @param mixed $variable
71
-    * @return VariableInfo
72
-    */
66
+    /**
67
+     * Creates a new variable info instance from a PHP variable
68
+     * of any type.
69
+     * 
70
+     * @param mixed $variable
71
+     * @return VariableInfo
72
+     */
73 73
     public static function fromVariable($variable) : VariableInfo
74 74
     {
75 75
         return new VariableInfo($variable);
76 76
     }
77 77
     
78
-   /**
79
-    * Restores a variable info instance using a previously serialized
80
-    * array using the serialize() method.
81
-    * 
82
-    * @param array $serialized
83
-    * @return VariableInfo
84
-    * @see VariableInfo::serialize()
85
-    */
78
+    /**
79
+     * Restores a variable info instance using a previously serialized
80
+     * array using the serialize() method.
81
+     * 
82
+     * @param array $serialized
83
+     * @return VariableInfo
84
+     * @see VariableInfo::serialize()
85
+     */
86 86
     public static function fromSerialized(array $serialized) : VariableInfo
87 87
     {
88 88
         return new VariableInfo(null, $serialized);
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
         $this->string = $this->_toString();
109 109
     }
110 110
     
111
-   /**
112
-    * The variable type - this is the same string that
113
-    * is returned by the PHP function `gettype`.
114
-    * 
115
-    * @return string
116
-    */
111
+    /**
112
+     * The variable type - this is the same string that
113
+     * is returned by the PHP function `gettype`.
114
+     * 
115
+     * @return string
116
+     */
117 117
     public function getType() : string
118 118
     {
119 119
         return $this->type;
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
         );
128 128
     }
129 129
     
130
-   /**
131
-    * Whether to prepend the variable type before the value, 
132
-    * like the var_dump function. Example: <code>string "Some text"</code>.
133
-    * 
134
-    * @param bool $enable
135
-    * @return VariableInfo
136
-    */
130
+    /**
131
+     * Whether to prepend the variable type before the value, 
132
+     * like the var_dump function. Example: <code>string "Some text"</code>.
133
+     * 
134
+     * @param bool $enable
135
+     * @return VariableInfo
136
+     */
137 137
     public function enableType(bool $enable=true) : VariableInfo
138 138
     {
139 139
         return $this->setOption('prepend-type', $enable);
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
         return $converted;
204 204
     }
205 205
     
206
-   /**
207
-    * Converts an array to a string.
208
-    * @return string
209
-    * 
210
-    * @todo Create custom dump implementation, using VariableInfo instances.
211
-    */
206
+    /**
207
+     * Converts an array to a string.
208
+     * @return string
209
+     * 
210
+     * @todo Create custom dump implementation, using VariableInfo instances.
211
+     */
212 212
     protected function toString_array() : string
213 213
     {
214 214
         $result = json_encode($this->value, JSON_PRETTY_PRINT);
Please login to merge, or discard this patch.