summaryrefslogtreecommitdiffstats
path: root/src/Components/Key.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/Key.php')
-rw-r--r--src/Components/Key.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Components/Key.php b/src/Components/Key.php
index ef5d3a8..89371fa 100644
--- a/src/Components/Key.php
+++ b/src/Components/Key.php
@@ -152,17 +152,18 @@ class Key extends Component
}
/**
- * @param Key $component The component to be built.
+ * @param Key $component The component to be built.
+ * @param array $options Parameters for building.
*
* @return string
*/
- public static function build($component)
+ public static function build($component, array $options = array())
{
$ret = $component->type . ' ';
if (!empty($component->name)) {
$ret .= Context::escape($component->name) . ' ';
}
- $ret .= '(' . implode(', ', Context::escape($component->columns)) . ') '
+ $ret .= '(' . implode(',', Context::escape($component->columns)) . ') '
. $component->options;
return trim($ret);
}