@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | { |
264 | 264 | $v = &$this->value; |
265 | 265 | if (is_null($v)) return null; |
266 | - if ($this->type & (Y::REF_CALL | Y::SCALAR)) return self::getScalar($v); |
|
267 | - if ($this->type & (Y::COMPACT_MAPPING | Y::COMPACT_SEQUENCE)) return self::getCompact(substr($v, 1, -1), $this->type); |
|
266 | + if ($this->type & (Y::REF_CALL|Y::SCALAR)) return self::getScalar($v); |
|
267 | + if ($this->type & (Y::COMPACT_MAPPING|Y::COMPACT_SEQUENCE)) return self::getCompact(substr($v, 1, -1), $this->type); |
|
268 | 268 | switch ($this->type) { |
269 | 269 | case Y::JSON: return json_decode($v, false, 512, JSON_PARTIAL_OUTPUT_ON_ERROR); |
270 | 270 | case Y::QUOTED: return substr($v, 1, -1); |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | { |
321 | 321 | $out = new Compact(); |
322 | 322 | if ($type === Y::COMPACT_SEQUENCE) { |
323 | - $f = function ($e) { return self::getScalar(trim($e));}; |
|
323 | + $f = function($e) { return self::getScalar(trim($e)); }; |
|
324 | 324 | //TODO : that's not robust enough, improve it |
325 | 325 | foreach (array_map($f, explode(",", $mappingOrSeqString)) as $key => $value) { |
326 | 326 | $out[$key] = $value; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function __call($funcName, $arguments) |
33 | 33 | { |
34 | 34 | $reflectAPI = new \ReflectionClass(get_class($this->__yaml__object__api)); |
35 | - $getName = function ($o) { return $o->name; }; |
|
35 | + $getName = function($o) { return $o->name; }; |
|
36 | 36 | $publicApi = array_map($getName, $reflectAPI->getMethods(\ReflectionMethod::IS_PUBLIC)); |
37 | 37 | $privateApi = array_map($getName, $reflectAPI->getMethods(\ReflectionMethod::IS_PRIVATE)); |
38 | 38 | if (!in_array($funcName, $publicApi) && !in_array($funcName, $privateApi)) { |