Skip to content

Commit

Permalink
propelorm#1086: Code review suggestions applying
Browse files Browse the repository at this point in the history
  • Loading branch information
tworzenieweb committed Jun 23, 2020
1 parent 87fddf2 commit 5aa667c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions runtime/lib/parser/yaml/sfYamlInline.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ protected static function dumpArray($value)
{
// array
$keys = array_keys($value);
if (
(1 == count($keys) && '0' == $keys[0])
||
(count($keys) > 1 && array_reduce($keys, function($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2))

if (count($value) > 0 && array_values($value) === $value)
{
$output = array();
foreach ($value as $val) {
Expand Down

0 comments on commit 5aa667c

Please sign in to comment.