@@ -28,15 +28,15 @@ class Inline
28
28
private static $ objectForMap = false ;
29
29
30
30
/**
31
- * Converts a YAML string to a PHP array .
31
+ * Converts a YAML string to a PHP value .
32
32
*
33
33
* @param string $value A YAML string
34
34
* @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
35
35
* @param bool $objectSupport true if object support is enabled, false otherwise
36
36
* @param bool $objectForMap true if maps should return a stdClass instead of array()
37
37
* @param array $references Mapping of variable names to values
38
38
*
39
- * @return array A PHP array representing the YAML string
39
+ * @return mixed A PHP value
40
40
*
41
41
* @throws ParseException
42
42
*/
@@ -90,7 +90,7 @@ public static function parse($value, $exceptionOnInvalidType = false, $objectSup
90
90
* @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
91
91
* @param bool $objectSupport true if object support is enabled, false otherwise
92
92
*
93
- * @return string The YAML string representing the PHP array
93
+ * @return string The YAML string representing the PHP value
94
94
*
95
95
* @throws DumpException When trying to dump PHP resource
96
96
*/
@@ -210,7 +210,7 @@ private static function dumpArray($value, $exceptionOnInvalidType, $objectSuppor
210
210
}
211
211
212
212
/**
213
- * Parses a scalar to a YAML string .
213
+ * Parses a YAML scalar .
214
214
*
215
215
* @param string $scalar
216
216
* @param string $delimiters
@@ -219,7 +219,7 @@ private static function dumpArray($value, $exceptionOnInvalidType, $objectSuppor
219
219
* @param bool $evaluate
220
220
* @param array $references
221
221
*
222
- * @return string A YAML string
222
+ * @return string
223
223
*
224
224
* @throws ParseException When malformed inline YAML string is parsed
225
225
*/
@@ -261,12 +261,12 @@ public static function parseScalar($scalar, $delimiters = null, $stringDelimiter
261
261
}
262
262
263
263
/**
264
- * Parses a quoted scalar to YAML .
264
+ * Parses a YAML quoted scalar.
265
265
*
266
266
* @param string $scalar
267
267
* @param int &$i
268
268
*
269
- * @return string A YAML string
269
+ * @return string
270
270
*
271
271
* @throws ParseException When malformed inline YAML string is parsed
272
272
*/
@@ -291,13 +291,13 @@ private static function parseQuotedScalar($scalar, &$i)
291
291
}
292
292
293
293
/**
294
- * Parses a sequence to a YAML string .
294
+ * Parses a YAML sequence .
295
295
*
296
296
* @param string $sequence
297
297
* @param int &$i
298
298
* @param array $references
299
299
*
300
- * @return string A YAML string
300
+ * @return array
301
301
*
302
302
* @throws ParseException When malformed inline YAML string is parsed
303
303
*/
@@ -350,1
8739
3 +350,13 @@ private static function parseSequence($sequence, &$i = 0, $references = array())
350
350
}
351
351
352
352
/**
353
- * Parses a mapping to a YAML string .
353
+ * Parses a YAML mapping .
354
354
*
355
355
* @param string $mapping
356
356
* @param int &$i
357
357
* @param array $references
358
358
*
359
- * @return string A YAML string
359
+ * @return array|\stdClass
360
360
*
361
361
* @throws ParseException When malformed inline YAML string is parsed
362
362
*/
0 commit comments