Skip to content

Commit

Permalink
Merge pull request #541 from pantheon-systems/php-5-3
Browse files Browse the repository at this point in the history
Fixes incompatibility with php 5.3
  • Loading branch information
Ronan Dowling committed Sep 28, 2015
2 parents a8f4245 + 084f616 commit f7d2496
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions php/Terminus/Outputters/PrettyFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function formatRecord($record, $human_labels = array()) {
$record = (array)$record;
foreach ((array)$record as $key => $value) {
$label = self::getHumanLabel($key, $human_labels);
$rows[] = [$label, $value];
$rows[] = array($label, $value);
}

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

/**
Expand Down
8 changes: 4 additions & 4 deletions php/commands/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private function command_to_array( $command ) {
* Print Terminus version.
*/
function version() {
$labels = ['version' => 'Terminus version', 'script' => 'Terminus script'];
$this->outputter->outputRecord(['version' => TERMINUS_VERSION, 'script' => TERMINUS_SCRIPT], $labels);
$labels = array('version' => 'Terminus version', 'script' => 'Terminus script');
$this->outputter->outputRecord(array('version' => TERMINUS_VERSION, 'script' => TERMINUS_SCRIPT), $labels);
}

/**
Expand All @@ -64,15 +64,15 @@ function info( $_, $assoc_args ) {
'wp_cli_dir_path' => TERMINUS_ROOT,
'wp_cli_version' => TERMINUS_VERSION,
);
$labels = [
$labels = array(
'php_binary_path' => 'PHP binary',
'php_version' => 'PHP version',
'php_ini' => 'php.ini used',
'global_config_path' => 'Terminus global config',
'project_config_path' => 'Terminus project config',
'wp_cli_dir_path' => 'Terminus root dir',
'wp_cli_version' => 'Terminus version',
];
);
$this->outputter->outputRecord($info, $labels);

}
Expand Down
2 changes: 1 addition & 1 deletion php/commands/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ public function environments($args, $assoc_args) {
'locked' => $locked,
);
}
$this->outputter->outputRecordList($data, ['name' => 'Name', 'created' => 'Created', 'domain' => 'Domain', 'onserverdev' => 'OnServer Dev?', 'locked' => 'Locked?']);
$this->outputter->outputRecordList($data, array('name' => 'Name', 'created' => 'Created', 'domain' => 'Domain', 'onserverdev' => 'OnServer Dev?', 'locked' => 'Locked?'));
return $data;
}

Expand Down
2 changes: 1 addition & 1 deletion php/commands/sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function index($args, $assoc_args) {
Terminus::log('You have no sites.');
}

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

Expand Down

0 comments on commit f7d2496

Please sign in to comment.