From f3d382cec4d3cf1e9e5ca3ae681fbff17db8aaeb Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 19 May 2015 06:57:21 +1000 Subject: [PATCH] Fix some method signatures Summary: Fix some method signatures so that arguments with default values are at the end of the argument list (see D12418). Test Plan: Eyeballed the callsites. Reviewers: epriestley, #blessed_reviewers, hach-que Reviewed By: epriestley, #blessed_reviewers, hach-que Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12782 --- .../celerity/CelerityStaticResourceResponse.php | 10 ++++++---- .../blueprint/DrydockBlueprintImplementation.php | 2 +- src/applications/people/storage/PhabricatorUserLog.php | 4 ++-- .../phragment/storage/PhragmentFragment.php | 6 +++--- src/view/layout/AphrontSideNavFilterView.php | 7 +------ 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/applications/celerity/CelerityStaticResourceResponse.php b/src/applications/celerity/CelerityStaticResourceResponse.php index 3f34b7634f..7864515e11 100644 --- a/src/applications/celerity/CelerityStaticResourceResponse.php +++ b/src/applications/celerity/CelerityStaticResourceResponse.php @@ -33,14 +33,16 @@ final class CelerityStaticResourceResponse { } /** - * Register a behavior for initialization. NOTE: if $config is empty, - * a behavior will execute only once even if it is initialized multiple times. - * If $config is nonempty, the behavior will be invoked once for each config. + * Register a behavior for initialization. + * + * NOTE: If `$config` is empty, a behavior will execute only once even if it + * is initialized multiple times. If `$config` is nonempty, the behavior will + * be invoked once for each configuration. */ public function initBehavior( $behavior, array $config = array(), - $source_name) { + $source_name = null) { $this->requireResource('javelin-behavior-'.$behavior, $source_name); diff --git a/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php index 43891d0d07..223d974541 100644 --- a/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php +++ b/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php @@ -353,7 +353,7 @@ abstract class DrydockBlueprintImplementation { public static function writeLog( DrydockResource $resource = null, DrydockLease $lease = null, - $message) { + $message = null) { $log = id(new DrydockLog()) ->setEpoch(time()) diff --git a/src/applications/people/storage/PhabricatorUserLog.php b/src/applications/people/storage/PhabricatorUserLog.php index acdd7b1efe..1f14a27e4c 100644 --- a/src/applications/people/storage/PhabricatorUserLog.php +++ b/src/applications/people/storage/PhabricatorUserLog.php @@ -87,8 +87,8 @@ final class PhabricatorUserLog extends PhabricatorUserDAO public static function initializeNewLog( PhabricatorUser $actor = null, - $object_phid, - $action) { + $object_phid = null, + $action = null) { $log = new PhabricatorUserLog(); diff --git a/src/applications/phragment/storage/PhragmentFragment.php b/src/applications/phragment/storage/PhragmentFragment.php index 574283d7a7..d58be033c0 100644 --- a/src/applications/phragment/storage/PhragmentFragment.php +++ b/src/applications/phragment/storage/PhragmentFragment.php @@ -78,9 +78,9 @@ final class PhragmentFragment extends PhragmentDAO public static function createFromFile( PhabricatorUser $viewer, PhabricatorFile $file = null, - $path, - $view_policy, - $edit_policy) { + $path = null, + $view_policy = null, + $edit_policy = null) { $fragment = id(new PhragmentFragment()); $fragment->setPath($path); diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php index 4f4c0803b8..fe8025026b 100644 --- a/src/view/layout/AphrontSideNavFilterView.php +++ b/src/view/layout/AphrontSideNavFilterView.php @@ -125,12 +125,7 @@ final class AphrontSideNavFilterView extends AphrontView { $key, $name, $uri, PHUIListItemView::TYPE_BUTTON); } - private function addThing( - $key, - $name, - $uri = null, - $type) { - + private function addThing($key, $name, $uri, $type) { $item = id(new PHUIListItemView()) ->setName($name) ->setType($type);