From b154e6ad1dd714cf40d4b44f33e75ffe33afbcee Mon Sep 17 00:00:00 2001 From: Mike Van Winkle Date: Tue, 9 Dec 2014 00:08:46 +0000 Subject: [PATCH] More backwards compatibility fixes and lint tests returned --- php/commands/organizations.php | 16 ++++++++-------- php/commands/site.php | 2 +- scripts/test.sh | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/php/commands/organizations.php b/php/commands/organizations.php index 3c5f8acf1..28ec9e770 100755 --- a/php/commands/organizations.php +++ b/php/commands/organizations.php @@ -52,16 +52,16 @@ 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); @@ -69,8 +69,8 @@ public function sites($args, $assoc_args) { 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); @@ -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), ); } diff --git a/php/commands/site.php b/php/commands/site.php index 363f6f049..b93ef947b 100755 --- a/php/commands/site.php +++ b/php/commands/site.php @@ -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); diff --git a/scripts/test.sh b/scripts/test.sh index 8294fd772..7398fbdd5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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