From 94730a1a4365528007cfa225dba3c41dbcf01214 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 20 Jan 2015 06:37:15 +1100 Subject: [PATCH] Minor tidying of some Aphlict code Summary: Self-explanatory. Test Plan: Eyeball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11424 --- .../notification/client/PhabricatorNotificationClient.php | 7 +++---- .../notification/setup/PhabricatorAphlictSetupCheck.php | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/applications/notification/client/PhabricatorNotificationClient.php b/src/applications/notification/client/PhabricatorNotificationClient.php index dedbda6d70..fed3ea4ec9 100644 --- a/src/applications/notification/client/PhabricatorNotificationClient.php +++ b/src/applications/notification/client/PhabricatorNotificationClient.php @@ -6,15 +6,14 @@ final class PhabricatorNotificationClient { public static function getServerStatus() { $uri = PhabricatorEnv::getEnvConfig('notification.server-uri'); - $uri = new PhutilURI($uri); - - $uri->setPath('/status/'); + $uri = id(new PhutilURI($uri)) + ->setPath('/status/'); list($body) = id(new HTTPSFuture($uri)) ->setTimeout(3) ->resolvex(); - $status = json_decode($body, true); + $status = phutil_json_decode($body); if (!is_array($status)) { throw new Exception( pht( diff --git a/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php b/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php index ecaa5116c8..91096c8240 100644 --- a/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php +++ b/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php @@ -37,8 +37,8 @@ final class PhabricatorAphlictSetupCheck extends PhabricatorSetupCheck { ->addRelatedPhabricatorConfig('notification.server-uri') ->addCommand( pht( - "(To start the server, run this command.)\n". - "phabricator/ $ ./bin/aphlict start")); + "(To start the server, run this command.)\n%s", + 'phabricator/ $ ./bin/aphlict start')); return; }