diff --git a/src/applications/calendar/util/CalendarTimeUtil.php b/src/applications/calendar/util/CalendarTimeUtil.php --- a/src/applications/calendar/util/CalendarTimeUtil.php +++ b/src/applications/calendar/util/CalendarTimeUtil.php @@ -69,7 +69,7 @@ $today_epoch = PhabricatorTime::parseLocalTime('today', $user); $today = new DateTime('@'.$today_epoch); - $today->setTimeZone($timezone); + $today->setTimezone($timezone); if (strtolower($start_day_str) == 'today' || $today->format('l') == $start_day_str) { @@ -79,7 +79,7 @@ 'last '.$start_day_str, $user); $start_day = new DateTime('@'.$start_epoch); - $start_day->setTimeZone($timezone); + $start_day->setTimezone($timezone); } return array( 'today' => $today, diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php --- a/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php +++ b/src/applications/daemon/management/PhabricatorDaemonManagementRestartWorkflow.php @@ -47,7 +47,7 @@ return $this->executeStartCommand( array( - 'reserve' => (float)$args->getArg('autoscale-reserve', 0.0), + 'reserve' => (float)$args->getArg('autoscale-reserve'), )); } diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementStartWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementStartWorkflow.php --- a/src/applications/daemon/management/PhabricatorDaemonManagementStartWorkflow.php +++ b/src/applications/daemon/management/PhabricatorDaemonManagementStartWorkflow.php @@ -34,7 +34,7 @@ array( 'keep-leases' => $args->getArg('keep-leases'), 'force' => $args->getArg('force'), - 'reserve' => (float)$args->getArg('autoscale-reserve', 0.0), + 'reserve' => (float)$args->getArg('autoscale-reserve'), )); } diff --git a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php --- a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php @@ -52,7 +52,7 @@ $commit, $path); } catch (CommandException $e) { - $stderr = $e->getStdErr(); + $stderr = $e->getStderr(); if (preg_match('/^fatal: Not a valid object name/', $stderr)) { // Grab two logs, since the first one is when the object was deleted. list($stdout) = $repository->execxLocalCommand( diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -446,7 +446,7 @@ $header->setHeader(pht('Branches')); if ($more_branches) { - $header->setSubHeader(pht('Showing %d branches.', $limit)); + $header->setSubheader(pht('Showing %d branches.', $limit)); } $button = new PHUIButtonView(); @@ -505,7 +505,7 @@ $header->setHeader(pht('Tags')); if ($more_tags) { - $header->setSubHeader( + $header->setSubheader( pht('Showing the %d most recent tags.', $tag_limit)); } diff --git a/src/applications/diffusion/editor/DiffusionCommitEditEngine.php b/src/applications/diffusion/editor/DiffusionCommitEditEngine.php --- a/src/applications/diffusion/editor/DiffusionCommitEditEngine.php +++ b/src/applications/diffusion/editor/DiffusionCommitEditEngine.php @@ -111,7 +111,6 @@ ->setValue($object->getAuditorPHIDsForEdit()); $reason = $data->getCommitDetail('autocloseReason', false); - $reason = PhabricatorRepository::BECAUSE_AUTOCLOSE_FORCED; if ($reason !== false) { switch ($reason) { case PhabricatorRepository::BECAUSE_REPOSITORY_IMPORTING: diff --git a/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php b/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php --- a/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php +++ b/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php @@ -46,7 +46,7 @@ if ($this->changesets instanceof Exception) { $ex_class = get_class($this->changesets); - $ex_message = $this->changesets->getmessage(); + $ex_message = $this->changesets->getMessage(); if ($type === 'name') { return array("<{$ex_class}: {$ex_message}>"); } else { diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php --- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php +++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php @@ -271,13 +271,13 @@ try { list($stdout) = $future->resolvex(); } catch (CommandException $ex) { - if (preg_match('/ambiguous identifier/', $ex->getStdErr())) { + if (preg_match('/ambiguous identifier/', $ex->getStderr())) { // This indicates that the ref ambiguously matched several things. // Eventually, it would be nice to return all of them, but it is // unclear how to best do that. For now, treat it as a miss instead. continue; } - if (preg_match('/unknown revision/', $ex->getStdErr())) { + if (preg_match('/unknown revision/', $ex->getStderr())) { // No matches for this ref. continue; } diff --git a/src/applications/diviner/atomizer/DivinerPHPAtomizer.php b/src/applications/diviner/atomizer/DivinerPHPAtomizer.php --- a/src/applications/diviner/atomizer/DivinerPHPAtomizer.php +++ b/src/applications/diviner/atomizer/DivinerPHPAtomizer.php @@ -128,7 +128,7 @@ private function parseParams(DivinerAtom $atom, AASTNode $func) { $params = $func - ->getChildByIndex(3, 'n_DECLARATAION_PARAMETER_LIST') + ->getChildOfType(3, 'n_DECLARATAION_PARAMETER_LIST') ->selectDescendantsOfType('n_DECLARATION_PARAMETER'); $param_spec = array(); diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php --- a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php +++ b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php @@ -340,6 +340,9 @@ return $this->save(); } + /** + * @return this + */ public function save() { if ($this->getID()) { return parent::save(); diff --git a/src/applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php b/src/applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php --- a/src/applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php +++ b/src/applications/phortune/management/PhabricatorPhortuneManagementInvoiceWorkflow.php @@ -86,7 +86,7 @@ $auto_range = $args->getArg('auto-range'); $last_arg = $args->getArg('last'); - $next_arg = $args->getARg('next'); + $next_arg = $args->getArg('next'); if (!$auto_range && !$last_arg && !$next_arg) { throw new PhutilArgumentUsageException( diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php --- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php @@ -233,7 +233,7 @@ $limit, $repository->getSubversionBaseURI($at_rev)); } catch (CommandException $ex) { - $stderr = $ex->getStdErr(); + $stderr = $ex->getStderr(); if (preg_match('/(path|File) not found/', $stderr)) { // We've gone all the way back through history and this path was not // affected by earlier commits. diff --git a/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php b/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php --- a/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php @@ -108,7 +108,7 @@ ->setCWD($repository->getLocalPath()) ->resolvex(); } catch (CommandException $ex) { - if (preg_match('/no changes found/', $ex->getStdOut())) { + if (preg_match('/no changes found/', $ex->getStdout())) { // mercurial says nothing changed, but that's good } else { throw $ex; diff --git a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php --- a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php @@ -471,7 +471,7 @@ $future->resolvex(); } catch (CommandException $ex) { $err = $ex->getError(); - $stdout = $ex->getStdOut(); + $stdout = $ex->getStdout(); // NOTE: Between versions 2.1 and 2.1.1, Mercurial changed the behavior // of "hg pull" to return 1 in case of a successful pull with no changes. diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php --- a/src/infrastructure/markup/PhabricatorMarkupEngine.php +++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php @@ -111,7 +111,7 @@ } if (!$keys) { - return; + return $this; } $objects = array_select_keys($this->objects, $keys); diff --git a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php --- a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php +++ b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php @@ -1521,6 +1521,7 @@ /** + * @return this * @task edgelogic */ public function withEdgeLogicConstraints($edge_type, array $constraints) { diff --git a/src/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php --- a/src/infrastructure/storage/lisk/LiskDAO.php +++ b/src/infrastructure/storage/lisk/LiskDAO.php @@ -1094,12 +1094,12 @@ /** - * Save this object, forcing the query to use INSERT regardless of object - * state. + * Save this object, forcing the query to use INSERT regardless of object + * state. * - * @return this + * @return this * - * @task save + * @task save */ public function insert() { $this->isEphemeralCheck(); @@ -1108,12 +1108,12 @@ /** - * Save this object, forcing the query to use UPDATE regardless of object - * state. + * Save this object, forcing the query to use UPDATE regardless of object + * state. * - * @return this + * @return this * - * @task save + * @task save */ public function update() { $this->isEphemeralCheck(); @@ -1192,6 +1192,7 @@ * Internal implementation of INSERT and REPLACE. * * @param const Either "INSERT" or "REPLACE", to force the desired mode. + * @return this * * @task save */ diff --git a/src/infrastructure/time/PhabricatorTime.php b/src/infrastructure/time/PhabricatorTime.php --- a/src/infrastructure/time/PhabricatorTime.php +++ b/src/infrastructure/time/PhabricatorTime.php @@ -64,7 +64,7 @@ public static function getTodayMidnightDateTime($viewer) { $timezone = new DateTimeZone($viewer->getTimezoneIdentifier()); $today = new DateTime('@'.time()); - $today->setTimeZone($timezone); + $today->setTimezone($timezone); $year = $today->format('Y'); $month = $today->format('m'); $day = $today->format('d'); @@ -74,7 +74,7 @@ public static function getDateTimeFromEpoch($epoch, PhabricatorUser $viewer) { $datetime = new DateTime('@'.$epoch); - $datetime->setTimeZone($viewer->getTimeZone()); + $datetime->setTimezone($viewer->getTimeZone()); return $datetime; } diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php --- a/src/view/phui/calendar/PHUICalendarMonthView.php +++ b/src/view/phui/calendar/PHUICalendarMonthView.php @@ -577,7 +577,7 @@ private function getTodayMidnight() { $viewer = $this->getUser(); $today = new DateTime('@'.time()); - $today->setTimeZone($viewer->getTimeZone()); + $today->setTimezone($viewer->getTimeZone()); $today->setTime(0, 0, 0); return $today; diff --git a/src/view/viewutils.php b/src/view/viewutils.php --- a/src/view/viewutils.php +++ b/src/view/viewutils.php @@ -88,7 +88,7 @@ "raised an exception.", $epoch)); } - $date->setTimeZone($zone); + $date->setTimezone($zone); return PhutilTranslator::getInstance()->translateDate($format, $date); }