Skip to content

Commit 5aa667c

Browse files
committed
propelorm#1086: Code review suggestions applying
1 parent 87fddf2 commit 5aa667c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

runtime/lib/parser/yaml/sfYamlInline.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,8 @@ protected static function dumpArray($value)
122122
{
123123
// array
124124
$keys = array_keys($value);
125-
if (
126-
(1 == count($keys) && '0' == $keys[0])
127-
||
128-
(count($keys) > 1 && array_reduce($keys, function($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2))
125+
126+
if (count($value) > 0 && array_values($value) === $value)
129127
{
130128
$output = array();
131129
foreach ($value as $val) {

0 commit comments

Comments
 (0)