Skip to content

Commit

Permalink
More backwards compatibility fixes and lint tests returned
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevanwinkle committed Dec 9, 2014
1 parent d259f30 commit b154e6a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions php/commands/organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,25 @@ public function sites($args, $assoc_args) {
$orgs[$id] = $org->name;
}

if (!isset($assoc_args['org'])) {
if (!isset($assoc_args['org']) OR empty($assoc_args['org'])) {
$selected_org = Terminus::menu($orgs,false,"Choose an organization");
} else {
$selected_org = @$assoc_args['org'];
$selected_org = $assoc_args['org'];
}

$org = new Organization($selected_org);

if (@$assoc_args['add']) {
$add = SiteFactory::instance(@$assoc_args['add']);
if (isset($assoc_args['add']) {
$add = SiteFactory::instance($assoc_args['add']);

Terminus::confirm("Are you sure you want to add %s to %s ?", $assoc_args, array($add->getName(), $org->name));
$org->addSite($add);
Terminus::success("Added site!");
return true;
}

if (@$assoc_args['remove']) {
$remove = SiteFactory::instance(@$assoc_args['remove']);
if (isset($assoc_args['remove'])) {
$remove = SiteFactory::instance($assoc_args['remove']);

Terminus::confirm("Are you sure you want to remove %s to %s ?", $assoc_args, array($remove->getName(), $org->name));
$org->removeSite($remove);
Expand All @@ -83,8 +83,8 @@ public function sites($args, $assoc_args) {
foreach ($sites as $site) {
$data[] = array(
'name' => $site->name,
'service level' => @$site->service_level,
'framework' => @$site->framework,
'service level' => $site->service_level,
'framework' => $site->framework,
'created' => date('Y-m-d H:i:s', $site->created),
);
}
Expand Down
2 changes: 1 addition & 1 deletion php/commands/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ public function upstream_updates($args, $assoc_args) {
}
}

if (isset($assoc_args['update']) AND !empty(@$upstream->update_log)) {
if (isset($assoc_args['update']) AND !empty($upstream->update_log)) {
$env = 'dev';
Terminus::confirm(sprintf("Are you sure you want to apply the upstream updates to %s-dev", $site->getName(), $env));
$response = $site->applyUpstreamUpdates($env);
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex

# Basic lint test
#for f in $( git diff-tree $TRAVIS_COMMIT --name-status -r | grep php | grep -v "^D" | awk '{print $2}') ; do php -l $f ; done
for f in $( git diff-tree $TRAVIS_COMMIT --name-status -r | grep php | grep -v "^D" | awk '{print $2}') ; do php -l $f ; done

# Run the unit tests
# phpunit
Expand Down

1 comment on commit b154e6a

@fujin
Copy link

@fujin fujin commented on b154e6a Dec 9, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#33

Please sign in to comment.