Commit cbb2b25b authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

Use PHP 5.3 array syntax

Bug 1566127

Change-Id: I8e249a93fbff7c3bf914099e53f1f29068a36a15
behatnotneeded: Covered by existing tests
(cherry picked from commit d5aef398)
parent ac060902
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ function get_line_graph_json($data, $colours = null, $cron = false) {
function get_graph_colours($data, $colours = null) {
    // Using colours in rgb format to allow for the use of rgba colours in Chart.js
    // 10 defaults: Red, Green, Blue, Yellow, Sky blue, Magenta, Orange, Light blue, Grey, Purple
    $defaultcolours = ['187,35,39','59,140,46','61,132,203','227,171,0','0,74,136','139,62,138','220,109,10','29,183,197','116,116,116','62,35,110'];
    $defaultcolours = array('187,35,39','59,140,46','61,132,203','227,171,0','0,74,136','139,62,138','220,109,10','29,183,197','116,116,116','62,35,110');

    // We try to set colours in this order:
    // passed in by user overides
+2 −2
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ class BehatForms extends BehatBase {
     */
    public function iFillInSelect2Field($field, $textValues) {
        $page = $this->getSession()->getPage();
        $values = [];
        $values = array();
        foreach(preg_split('/,\s*/', $textValues) as $value) {
            $option = $page->find('xpath', '//select[@id="' . $field . '"]//option[text()="' . $value . '"]');
            $values[] = $option->getAttribute('value');
@@ -157,7 +157,7 @@ class BehatForms extends BehatBase {
        if (!$select2Input) {
            throw new \Exception(sprintf('No field "%s" found', $field));
        }
        $select2Input->postValue(['value' => [$value]]);
        $select2Input->postValue(array('value' => array($value)));
        $this->getSession()->wait(10000, "(jQuery('#select2-{$field}-results .loading-results').length === 0)");
    }
    /**