Skip to content

Commit f7d2496

Browse files
author
Ronan Dowling
committed
Merge pull request #541 from pantheon-systems/php-5-3
Fixes incompatibility with php 5.3
2 parents a8f4245 + 084f616 commit f7d2496

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

php/Terminus/Outputters/PrettyFormatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public function formatRecord($record, $human_labels = array()) {
4646
$record = (array)$record;
4747
foreach ((array)$record as $key => $value) {
4848
$label = self::getHumanLabel($key, $human_labels);
49-
$rows[] = [$label, $value];
49+
$rows[] = array($label, $value);
5050
}
5151

52-
return $this->formatTable($rows, ['Key', 'Value']);
52+
return $this->formatTable($rows, array('Key', 'Value'));
5353
}
5454

5555
/**

php/commands/cli.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ private function command_to_array( $command ) {
3838
* Print Terminus version.
3939
*/
4040
function version() {
41-
$labels = ['version' => 'Terminus version', 'script' => 'Terminus script'];
42-
$this->outputter->outputRecord(['version' => TERMINUS_VERSION, 'script' => TERMINUS_SCRIPT], $labels);
41+
$labels = array('version' => 'Terminus version', 'script' => 'Terminus script');
42+
$this->outputter->outputRecord(array('version' => TERMINUS_VERSION, 'script' => TERMINUS_SCRIPT), $labels);
4343
}
4444

4545
/**
@@ -64,15 +64,15 @@ function info( $_, $assoc_args ) {
6464
'wp_cli_dir_path' => TERMINUS_ROOT,
6565
'wp_cli_version' => TERMINUS_VERSION,
6666
);
67-
$labels = [
67+
$labels = array(
6868
'php_binary_path' => 'PHP binary',
6969
'php_version' => 'PHP version',
7070
'php_ini' => 'php.ini used',
7171
'global_config_path' => 'Terminus global config',
7272
'project_config_path' => 'Terminus project config',
7373
'wp_cli_dir_path' => 'Terminus root dir',
7474
'wp_cli_version' => 'Terminus version',
75-
];
75+
);
7676
$this->outputter->outputRecord($info, $labels);
7777

7878
}

php/commands/site.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ public function environments($args, $assoc_args) {
10551055
'locked' => $locked,
10561056
);
10571057
}
1058-
$this->outputter->outputRecordList($data, ['name' => 'Name', 'created' => 'Created', 'domain' => 'Domain', 'onserverdev' => 'OnServer Dev?', 'locked' => 'Locked?']);
1058+
$this->outputter->outputRecordList($data, array('name' => 'Name', 'created' => 'Created', 'domain' => 'Domain', 'onserverdev' => 'OnServer Dev?', 'locked' => 'Locked?'));
10591059
return $data;
10601060
}
10611061

php/commands/sites.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function index($args, $assoc_args) {
8989
Terminus::log('You have no sites.');
9090
}
9191

92-
$labels = ['name' => 'Name', 'id', 'ID', 'service_level', 'Service Level', 'framework' => 'Framework', 'created' => 'Created', 'memberships' => 'Memberships'];
92+
$labels = array('name' => 'Name', 'id', 'ID', 'service_level', 'Service Level', 'framework' => 'Framework', 'created' => 'Created', 'memberships' => 'Memberships');
9393
$this->outputter->outputRecordList($rows, $labels);
9494
}
9595

0 commit comments

Comments
 (0)