diff --git a/src/applications/audit/storage/PhabricatorAuditTransactionComment.php b/src/applications/audit/storage/PhabricatorAuditTransactionComment.php index cb9d5e20eb..f487c58a53 100644 --- a/src/applications/audit/storage/PhabricatorAuditTransactionComment.php +++ b/src/applications/audit/storage/PhabricatorAuditTransactionComment.php @@ -66,7 +66,7 @@ final class PhabricatorAuditTransactionComment } public function attachReplyToComment( - PhabricatorAuditTransactionComment $comment = null) { + ?PhabricatorAuditTransactionComment $comment = null) { $this->replyToComment = $comment; return $this; } @@ -93,7 +93,7 @@ final class PhabricatorAuditTransactionComment } public function attachInlineContext( - PhabricatorInlineCommentContext $context = null) { + ?PhabricatorInlineCommentContext $context = null) { $this->inlineContext = $context; return $this; } diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 58ec2aa189..58106939ab 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -338,7 +338,7 @@ abstract class PhabricatorApplication */ public function buildMainMenuItems( PhabricatorUser $user, - PhabricatorController $controller = null) { + ?PhabricatorController $controller = null) { return array(); } diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php index 941ec6220d..e3adc73dd0 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -130,7 +130,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO private function newChild( PhabricatorUser $actor, $sequence, - PhutilCalendarDateTime $start = null) { + ?PhutilCalendarDateTime $start = null) { if (!$this->isParentEvent()) { throw new Exception( pht( @@ -188,7 +188,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO public function copyFromParent( PhabricatorUser $actor, - PhutilCalendarDateTime $start = null) { + ?PhutilCalendarDateTime $start = null) { if (!$this->isChildEvent()) { throw new Exception( @@ -287,7 +287,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO public function newGhost( PhabricatorUser $actor, $sequence, - PhutilCalendarDateTime $start = null) { + ?PhutilCalendarDateTime $start = null) { $ghost = $this->newChild($actor, $sequence, $start); @@ -559,7 +559,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO return $this->assertAttached($this->parentEvent); } - public function attachParentEvent(PhabricatorCalendarEvent $event = null) { + public function attachParentEvent(?PhabricatorCalendarEvent $event = null) { $this->parentEvent = $event; return $this; } @@ -957,7 +957,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO $datetime->newAbsoluteDateTime()->toDictionary()); } - public function setUntilDateTime(PhutilCalendarDateTime $datetime = null) { + public function setUntilDateTime(?PhutilCalendarDateTime $datetime = null) { if ($datetime) { $value = $datetime->newAbsoluteDateTime()->toDictionary(); } else { @@ -1045,7 +1045,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO } public function attachImportSource( - PhabricatorCalendarImport $import = null) { + ?PhabricatorCalendarImport $import = null) { $this->importSource = $import; return $this; } diff --git a/src/applications/config/schema/PhabricatorConfigSchemaQuery.php b/src/applications/config/schema/PhabricatorConfigSchemaQuery.php index 4a93396671..6143b23792 100644 --- a/src/applications/config/schema/PhabricatorConfigSchemaQuery.php +++ b/src/applications/config/schema/PhabricatorConfigSchemaQuery.php @@ -349,8 +349,8 @@ final class PhabricatorConfigSchemaQuery extends Phobject { } private function compareSchemata( - PhabricatorConfigStorageSchema $expect = null, - PhabricatorConfigStorageSchema $actual = null) { + ?PhabricatorConfigStorageSchema $expect = null, + ?PhabricatorConfigStorageSchema $actual = null) { $expect_is_key = ($expect instanceof PhabricatorConfigKeySchema); $actual_is_key = ($actual instanceof PhabricatorConfigKeySchema); diff --git a/src/applications/differential/storage/DifferentialChangeset.php b/src/applications/differential/storage/DifferentialChangeset.php index 7b20c22a34..baa9647420 100644 --- a/src/applications/differential/storage/DifferentialChangeset.php +++ b/src/applications/differential/storage/DifferentialChangeset.php @@ -290,8 +290,8 @@ final class DifferentialChangeset } public function getAbsoluteRepositoryPath( - PhabricatorRepository $repository = null, - DifferentialDiff $diff = null) { + ?PhabricatorRepository $repository = null, + ?DifferentialDiff $diff = null) { $base = '/'; if ($diff && $diff->getSourceControlPath()) { @@ -550,7 +550,7 @@ final class DifferentialChangeset } public function newComparisonChangeset( - DifferentialChangeset $against = null) { + ?DifferentialChangeset $against = null) { $left = $this; $right = $against; diff --git a/src/applications/differential/storage/DifferentialDiff.php b/src/applications/differential/storage/DifferentialDiff.php index 8f537cff77..3a757434ef 100644 --- a/src/applications/differential/storage/DifferentialDiff.php +++ b/src/applications/differential/storage/DifferentialDiff.php @@ -332,7 +332,7 @@ final class DifferentialDiff return $this->assertAttached($this->revision); } - public function attachRevision(DifferentialRevision $revision = null) { + public function attachRevision(?DifferentialRevision $revision = null) { $this->revision = $revision; return $this; } @@ -363,7 +363,7 @@ final class DifferentialDiff return $this->assertAttached($this->properties); } - public function attachBuildable(HarbormasterBuildable $buildable = null) { + public function attachBuildable(?HarbormasterBuildable $buildable = null) { $this->buildable = $buildable; return $this; } diff --git a/src/applications/differential/storage/DifferentialHunk.php b/src/applications/differential/storage/DifferentialHunk.php index f7decf69ae..891fac745a 100644 --- a/src/applications/differential/storage/DifferentialHunk.php +++ b/src/applications/differential/storage/DifferentialHunk.php @@ -435,7 +435,7 @@ final class DifferentialHunk private function destroyData( $type, $data, - PhabricatorDestructionEngine $engine = null) { + ?PhabricatorDestructionEngine $engine = null) { if (!$engine) { $engine = new PhabricatorDestructionEngine(); diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php index 92b303d0ba..0dcfe0ce1c 100644 --- a/src/applications/differential/storage/DifferentialRevision.php +++ b/src/applications/differential/storage/DifferentialRevision.php @@ -592,7 +592,7 @@ final class DifferentialRevision extends DifferentialDAO return $this->assertAttached($this->repository); } - public function attachRepository(PhabricatorRepository $repository = null) { + public function attachRepository(?PhabricatorRepository $repository = null) { $this->repository = $repository; return $this; } @@ -668,7 +668,7 @@ final class DifferentialRevision extends DifferentialDAO public function attachFlag( PhabricatorUser $viewer, - PhabricatorFlag $flag = null) { + ?PhabricatorFlag $flag = null) { $this->flags[$viewer->getPHID()] = $flag; return $this; } diff --git a/src/applications/differential/storage/DifferentialTransactionComment.php b/src/applications/differential/storage/DifferentialTransactionComment.php index 873aecdd41..7e2621e7aa 100644 --- a/src/applications/differential/storage/DifferentialTransactionComment.php +++ b/src/applications/differential/storage/DifferentialTransactionComment.php @@ -25,7 +25,7 @@ final class DifferentialTransactionComment } public function attachReplyToComment( - DifferentialTransactionComment $comment = null) { + ?DifferentialTransactionComment $comment = null) { $this->replyToComment = $comment; return $this; } @@ -139,7 +139,7 @@ final class DifferentialTransactionComment } public function attachInlineContext( - PhabricatorInlineCommentContext $context = null) { + ?PhabricatorInlineCommentContext $context = null) { $this->inlineContext = $context; return $this; } diff --git a/src/applications/diviner/storage/DivinerLiveBook.php b/src/applications/diviner/storage/DivinerLiveBook.php index 480bc50d05..31a3927def 100644 --- a/src/applications/diviner/storage/DivinerLiveBook.php +++ b/src/applications/diviner/storage/DivinerLiveBook.php @@ -72,7 +72,7 @@ final class DivinerLiveBook extends DivinerDAO return idx($spec, 'name', $group); } - public function attachRepository(PhabricatorRepository $repository = null) { + public function attachRepository(?PhabricatorRepository $repository = null) { $this->repository = $repository; return $this; } diff --git a/src/applications/diviner/storage/DivinerLiveSymbol.php b/src/applications/diviner/storage/DivinerLiveSymbol.php index 6477e00879..1be38a4c06 100644 --- a/src/applications/diviner/storage/DivinerLiveSymbol.php +++ b/src/applications/diviner/storage/DivinerLiveSymbol.php @@ -102,7 +102,7 @@ final class DivinerLiveSymbol extends DivinerDAO return $this->assertAttached($this->repository); } - public function attachRepository(PhabricatorRepository $repository = null) { + public function attachRepository(?PhabricatorRepository $repository = null) { $this->repository = $repository; return $this; } @@ -111,7 +111,7 @@ final class DivinerLiveSymbol extends DivinerDAO return $this->assertAttached($this->atom); } - public function attachAtom(DivinerLiveAtom $atom = null) { + public function attachAtom(?DivinerLiveAtom $atom = null) { if ($atom === null) { $this->atom = null; } else { diff --git a/src/applications/doorkeeper/bridge/DoorkeeperBridgedObjectInterface.php b/src/applications/doorkeeper/bridge/DoorkeeperBridgedObjectInterface.php index 9d829642fc..bc07f3680e 100644 --- a/src/applications/doorkeeper/bridge/DoorkeeperBridgedObjectInterface.php +++ b/src/applications/doorkeeper/bridge/DoorkeeperBridgedObjectInterface.php @@ -3,6 +3,6 @@ interface DoorkeeperBridgedObjectInterface { public function getBridgedObject(); - public function attachBridgedObject(DoorkeeperExternalObject $object = null); + public function attachBridgedObject(?DoorkeeperExternalObject $object = null); } diff --git a/src/applications/drydock/storage/DrydockLease.php b/src/applications/drydock/storage/DrydockLease.php index cdf357863c..b977a93c90 100644 --- a/src/applications/drydock/storage/DrydockLease.php +++ b/src/applications/drydock/storage/DrydockLease.php @@ -139,7 +139,7 @@ final class DrydockLease extends DrydockDAO return $this->assertAttached($this->resource); } - public function attachResource(DrydockResource $resource = null) { + public function attachResource(?DrydockResource $resource = null) { $this->resource = $resource; return $this; } diff --git a/src/applications/drydock/storage/DrydockLog.php b/src/applications/drydock/storage/DrydockLog.php index 81879944a0..9615d85bdf 100644 --- a/src/applications/drydock/storage/DrydockLog.php +++ b/src/applications/drydock/storage/DrydockLog.php @@ -49,7 +49,7 @@ final class DrydockLog extends DrydockDAO ) + parent::getConfiguration(); } - public function attachBlueprint(DrydockBlueprint $blueprint = null) { + public function attachBlueprint(?DrydockBlueprint $blueprint = null) { $this->blueprint = $blueprint; return $this; } @@ -58,7 +58,7 @@ final class DrydockLog extends DrydockDAO return $this->assertAttached($this->blueprint); } - public function attachResource(DrydockResource $resource = null) { + public function attachResource(?DrydockResource $resource = null) { $this->resource = $resource; return $this; } @@ -67,7 +67,7 @@ final class DrydockLog extends DrydockDAO return $this->assertAttached($this->resource); } - public function attachLease(DrydockLease $lease = null) { + public function attachLease(?DrydockLease $lease = null) { $this->lease = $lease; return $this; } @@ -77,7 +77,7 @@ final class DrydockLog extends DrydockDAO } public function attachOperation( - DrydockRepositoryOperation $operation = null) { + ?DrydockRepositoryOperation $operation = null) { $this->operation = $operation; return $this; } diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index 7d90f73744..0c21849869 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -1314,7 +1314,7 @@ final class PhabricatorFile extends PhabricatorFileDAO return $this->assertAttached($this->originalFile); } - public function attachOriginalFile(PhabricatorFile $file = null) { + public function attachOriginalFile(?PhabricatorFile $file = null) { $this->originalFile = $file; return $this; } diff --git a/src/applications/files/storage/PhabricatorFileAttachment.php b/src/applications/files/storage/PhabricatorFileAttachment.php index c6aa170c79..4b8c106618 100644 --- a/src/applications/files/storage/PhabricatorFileAttachment.php +++ b/src/applications/files/storage/PhabricatorFileAttachment.php @@ -71,7 +71,7 @@ final class PhabricatorFileAttachment return $this->assertAttached($this->object); } - public function attachFile(PhabricatorFile $file = null) { + public function attachFile(?PhabricatorFile $file = null) { $this->file = $file; return $this; } diff --git a/src/applications/files/storage/PhabricatorFileChunk.php b/src/applications/files/storage/PhabricatorFileChunk.php index 648ec18c6b..d3c58842e6 100644 --- a/src/applications/files/storage/PhabricatorFileChunk.php +++ b/src/applications/files/storage/PhabricatorFileChunk.php @@ -44,7 +44,7 @@ final class PhabricatorFileChunk extends PhabricatorFileDAO ->setByteEnd($end); } - public function attachDataFile(PhabricatorFile $file = null) { + public function attachDataFile(?PhabricatorFile $file = null) { $this->dataFile = $file; return $this; } diff --git a/src/applications/fund/storage/FundBacker.php b/src/applications/fund/storage/FundBacker.php index ebdf39ae17..c2bf13aeb8 100644 --- a/src/applications/fund/storage/FundBacker.php +++ b/src/applications/fund/storage/FundBacker.php @@ -64,7 +64,7 @@ final class FundBacker extends FundDAO return $this->assertAttached($this->initiative); } - public function attachInitiative(FundInitiative $initiative = null) { + public function attachInitiative(?FundInitiative $initiative = null) { $this->initiative = $initiative; return $this; } diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuild.php b/src/applications/harbormaster/storage/build/HarbormasterBuild.php index 24c9689b46..0d9274a3c8 100644 --- a/src/applications/harbormaster/storage/build/HarbormasterBuild.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuild.php @@ -90,7 +90,7 @@ final class HarbormasterBuild extends HarbormasterDAO } public function attachBuildPlan( - HarbormasterBuildPlan $build_plan = null) { + ?HarbormasterBuildPlan $build_plan = null) { $this->buildPlan = $build_plan; return $this; } diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuildLog.php b/src/applications/harbormaster/storage/build/HarbormasterBuildLog.php index 5df8b30bff..9e95356fc9 100644 --- a/src/applications/harbormaster/storage/build/HarbormasterBuildLog.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuildLog.php @@ -715,7 +715,7 @@ final class HarbormasterBuildLog $this->delete(); } - public function destroyFile(PhabricatorDestructionEngine $engine = null) { + public function destroyFile(?PhabricatorDestructionEngine $engine = null) { if (!$engine) { $engine = new PhabricatorDestructionEngine(); } diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php b/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php index fa838288c1..82f8cdd373 100644 --- a/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuildTarget.php @@ -146,7 +146,7 @@ final class HarbormasterBuildTarget return $this->assertAttached($this->build); } - public function attachBuildStep(HarbormasterBuildStep $step = null) { + public function attachBuildStep(?HarbormasterBuildStep $step = null) { $this->buildStep = $step; return $this; } diff --git a/src/applications/legalpad/storage/LegalpadDocument.php b/src/applications/legalpad/storage/LegalpadDocument.php index e3245532e8..f501c69611 100644 --- a/src/applications/legalpad/storage/LegalpadDocument.php +++ b/src/applications/legalpad/storage/LegalpadDocument.php @@ -131,7 +131,7 @@ final class LegalpadDocument extends LegalpadDAO public function attachUserSignature( $user_phid, - LegalpadDocumentSignature $signature = null) { + ?LegalpadDocumentSignature $signature = null) { $this->userSignatures[$user_phid] = $signature; return $this; } diff --git a/src/applications/macro/storage/PhabricatorFileImageMacro.php b/src/applications/macro/storage/PhabricatorFileImageMacro.php index 656a4c9c57..b03a84efe2 100644 --- a/src/applications/macro/storage/PhabricatorFileImageMacro.php +++ b/src/applications/macro/storage/PhabricatorFileImageMacro.php @@ -32,7 +32,7 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO return $this->assertAttached($this->file); } - public function attachAudio(PhabricatorFile $audio = null) { + public function attachAudio(?PhabricatorFile $audio = null) { $this->audio = $audio; return $this; } diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php index 46dd8a1547..32cfb0966a 100644 --- a/src/applications/maniphest/storage/ManiphestTask.php +++ b/src/applications/maniphest/storage/ManiphestTask.php @@ -539,7 +539,7 @@ final class ManiphestTask extends ManiphestDAO } public function attachBridgedObject( - DoorkeeperExternalObject $object = null) { + ?DoorkeeperExternalObject $object = null) { $this->bridgedObject = $object; return $this; } diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php index 04b5d9dc22..9f0d34de9e 100644 --- a/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php +++ b/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php @@ -444,7 +444,7 @@ final class PhabricatorMetaMTAReceivedMail extends PhabricatorMetaMTADAO { private function sendExceptionMail( Exception $ex, - PhabricatorUser $viewer = null) { + ?PhabricatorUser $viewer = null) { // If we've failed to identify a legitimate sender, we don't send them // an error message back. We want to avoid sending mail to unverified diff --git a/src/applications/nuance/storage/NuanceItem.php b/src/applications/nuance/storage/NuanceItem.php index f182e17580..d1baf8d730 100644 --- a/src/applications/nuance/storage/NuanceItem.php +++ b/src/applications/nuance/storage/NuanceItem.php @@ -180,7 +180,7 @@ final class NuanceItem return $this->assertAttached($this->queue); } - public function attachQueue(NuanceQueue $queue = null) { + public function attachQueue(?NuanceQueue $queue = null) { $this->queue = $queue; return $this; } diff --git a/src/applications/passphrase/storage/PassphraseCredential.php b/src/applications/passphrase/storage/PassphraseCredential.php index d180fc6b31..5e10796249 100644 --- a/src/applications/passphrase/storage/PassphraseCredential.php +++ b/src/applications/passphrase/storage/PassphraseCredential.php @@ -91,7 +91,7 @@ final class PassphraseCredential extends PassphraseDAO PassphraseCredentialPHIDType::TYPECONST); } - public function attachSecret(PhutilOpaqueEnvelope $secret = null) { + public function attachSecret(?PhutilOpaqueEnvelope $secret = null) { $this->secret = $secret; return $this; } diff --git a/src/applications/people/storage/PhabricatorUserLog.php b/src/applications/people/storage/PhabricatorUserLog.php index 61ccaff1ed..33175620a4 100644 --- a/src/applications/people/storage/PhabricatorUserLog.php +++ b/src/applications/people/storage/PhabricatorUserLog.php @@ -13,7 +13,7 @@ final class PhabricatorUserLog extends PhabricatorUserDAO protected $session; public static function initializeNewLog( - PhabricatorUser $actor = null, + ?PhabricatorUser $actor = null, $object_phid = null, $action = null) { diff --git a/src/applications/phortune/storage/PhortuneCart.php b/src/applications/phortune/storage/PhortuneCart.php index 91171037c6..0cd4dcc776 100644 --- a/src/applications/phortune/storage/PhortuneCart.php +++ b/src/applications/phortune/storage/PhortuneCart.php @@ -106,7 +106,7 @@ final class PhortuneCart extends PhortuneDAO public function willApplyCharge( PhabricatorUser $actor, PhortunePaymentProvider $provider, - PhortunePaymentMethod $method = null) { + ?PhortunePaymentMethod $method = null) { $account = $this->getAccount(); diff --git a/src/applications/phortune/storage/PhortuneCharge.php b/src/applications/phortune/storage/PhortuneCharge.php index 41808a31e5..3250e1b87a 100644 --- a/src/applications/phortune/storage/PhortuneCharge.php +++ b/src/applications/phortune/storage/PhortuneCharge.php @@ -137,7 +137,7 @@ final class PhortuneCharge extends PhortuneDAO return $this->assertAttached($this->cart); } - public function attachCart(PhortuneCart $cart = null) { + public function attachCart(?PhortuneCart $cart = null) { $this->cart = $cart; return $this; } diff --git a/src/applications/policy/storage/PhabricatorPolicy.php b/src/applications/policy/storage/PhabricatorPolicy.php index 56f15e37b8..e9f1c09fa1 100644 --- a/src/applications/policy/storage/PhabricatorPolicy.php +++ b/src/applications/policy/storage/PhabricatorPolicy.php @@ -47,7 +47,7 @@ final class PhabricatorPolicy public static function newFromPolicyAndHandle( $policy_identifier, - PhabricatorObjectHandle $handle = null) { + ?PhabricatorObjectHandle $handle = null) { $is_global = PhabricatorPolicyQuery::isGlobalPolicy($policy_identifier); if ($is_global) { diff --git a/src/applications/ponder/storage/PonderAnswer.php b/src/applications/ponder/storage/PonderAnswer.php index 9179e22a44..2ec7fdb2b5 100644 --- a/src/applications/ponder/storage/PonderAnswer.php +++ b/src/applications/ponder/storage/PonderAnswer.php @@ -40,7 +40,7 @@ final class PonderAnswer extends PonderDAO } - public function attachQuestion(PonderQuestion $question = null) { + public function attachQuestion(?PonderQuestion $question = null) { $this->question = $question; return $this; } diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php index 6aebc954df..74083ae646 100644 --- a/src/applications/project/storage/PhabricatorProject.php +++ b/src/applications/project/storage/PhabricatorProject.php @@ -67,7 +67,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO public static function initializeNewProject( PhabricatorUser $actor, - PhabricatorProject $parent = null) { + ?PhabricatorProject $parent = null) { $app = id(new PhabricatorApplicationQuery()) ->setViewer(PhabricatorUser::getOmnipotentUser()) @@ -498,7 +498,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO return $this->assertAttached($this->parentProject); } - public function attachParentProject(PhabricatorProject $project = null) { + public function attachParentProject(?PhabricatorProject $project = null) { $this->parentProject = $project; return $this; } diff --git a/src/applications/project/storage/PhabricatorProjectColumn.php b/src/applications/project/storage/PhabricatorProjectColumn.php index e4359acd1b..e66bc83184 100644 --- a/src/applications/project/storage/PhabricatorProjectColumn.php +++ b/src/applications/project/storage/PhabricatorProjectColumn.php @@ -186,7 +186,7 @@ final class PhabricatorProjectColumn return sprintf('%s%012d', $group, $sequence); } - public function attachTrigger(PhabricatorProjectTrigger $trigger = null) { + public function attachTrigger(?PhabricatorProjectTrigger $trigger = null) { $this->trigger = $trigger; return $this; } diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index d58fed0519..15caeafcf3 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -250,7 +250,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO } public function attachMostRecentCommit( - PhabricatorRepositoryCommit $commit = null) { + ?PhabricatorRepositoryCommit $commit = null) { $this->mostRecentCommit = $commit; return $this; } diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommit.php b/src/applications/repository/storage/PhabricatorRepositoryCommit.php index ef3657d49f..76e46a4dcc 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryCommit.php +++ b/src/applications/repository/storage/PhabricatorRepositoryCommit.php @@ -169,7 +169,7 @@ final class PhabricatorRepositoryCommit } public function attachCommitData( - PhabricatorRepositoryCommitData $data = null) { + ?PhabricatorRepositoryCommitData $data = null) { $this->commitData = $data; return $this; } @@ -198,8 +198,8 @@ final class PhabricatorRepositoryCommit } public function attachIdentities( - PhabricatorRepositoryIdentity $author = null, - PhabricatorRepositoryIdentity $committer = null) { + ?PhabricatorRepositoryIdentity $author = null, + ?PhabricatorRepositoryIdentity $committer = null) { $this->authorIdentity = $author; $this->committerIdentity = $committer; diff --git a/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php b/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php index 85ea27062b..f7b4edc94e 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php +++ b/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php @@ -59,7 +59,7 @@ final class PhabricatorRepositoryPullEvent PhabricatorRepositoryPullEventPHIDType::TYPECONST); } - public function attachRepository(PhabricatorRepository $repository = null) { + public function attachRepository(?PhabricatorRepository $repository = null) { $this->repository = $repository; return $this; } diff --git a/src/applications/settings/storage/PhabricatorUserPreferences.php b/src/applications/settings/storage/PhabricatorUserPreferences.php index f004361a29..8727aed2d1 100644 --- a/src/applications/settings/storage/PhabricatorUserPreferences.php +++ b/src/applications/settings/storage/PhabricatorUserPreferences.php @@ -93,7 +93,7 @@ final class PhabricatorUserPreferences return $this; } - public function attachUser(PhabricatorUser $user = null) { + public function attachUser(?PhabricatorUser $user = null) { $this->user = $user; return $this; } diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php index 70a6c6d0f5..e8dccdebf1 100644 --- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php +++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php @@ -96,7 +96,7 @@ final class PhabricatorWorkerTrigger return $this->assertAttached($this->event); } - public function attachEvent(PhabricatorWorkerTriggerEvent $event = null) { + public function attachEvent(?PhabricatorWorkerTriggerEvent $event = null) { $this->event = $event; return $this; } diff --git a/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php b/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php index 88ec92daba..32cd10da23 100644 --- a/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php +++ b/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php @@ -159,7 +159,7 @@ abstract class PhabricatorLiskDAO extends LiskDAO { $database)); } - private function raiseUnreachable($database, Exception $proxy = null) { + private function raiseUnreachable($database, ?Exception $proxy = null) { $message = pht( 'Unable to establish a connection to any database host '. '(while trying "%s"). All masters and replicas are completely '.