don't dump indexes all on the same line

This commit is contained in:
AD7six 2012-05-09 16:29:06 +02:00
parent 3a5e00fa53
commit 8060dd57d3

View file

@ -414,12 +414,12 @@ class CakeSchema extends Object {
unset($value['type']);
$col .= join(', ', $this->_values($value));
} elseif ($field == 'indexes') {
$col = "\t\t'indexes' => array(";
$col = "\t\t'indexes' => array(\n\t\t\t";
$props = array();
foreach ((array)$value as $key => $index) {
$props[] = "'{$key}' => array(" . join(', ', $this->_values($index)) . ")";
}
$col .= join(', ', $props);
$col .= join(",\n\t\t\t", $props) . "\n\t\t";
} elseif ($field == 'tableParameters') {
$col = "\t\t'tableParameters' => array(";
$props = array();