From cefcbbbc18772e9276e52201bd7e29eb6ead2f2a Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 11 Oct 2024 20:46:13 +0200 Subject: [PATCH] deferred: Add @phan-mandatory-param for function name arguments Providing the function name is often optional from the php code, but it is needed for better logging, so make it mandatory and let phan report issues about this. Bug: T374546 Follow-Up: I5227f2fa65850ac8c6f620900f22d1f4e7bfd470 Change-Id: I3becd23d3ba9f452a8afd833d509cd907e56ca47 --- includes/deferred/MWCallableUpdate.php | 2 +- includes/deferred/TransactionRoundDefiningUpdate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/deferred/MWCallableUpdate.php b/includes/deferred/MWCallableUpdate.php index 0f241fc32cb..8239d4f1eb4 100644 --- a/includes/deferred/MWCallableUpdate.php +++ b/includes/deferred/MWCallableUpdate.php @@ -25,7 +25,7 @@ class MWCallableUpdate * @param callable $callback One of the following: * - A Closure callback that takes the caller name as its argument * - A non-Closure callback that takes no arguments - * @param string $fname Calling method + * @param string $fname Calling method @phan-mandatory-param * @param IDatabase|IDatabase[] $dependeeDbws DB handles which might have pending writes * upon which this update depends. If any of the handles already has an open transaction, * a rollback thereof will cause this update to be cancelled (if it has not already run). diff --git a/includes/deferred/TransactionRoundDefiningUpdate.php b/includes/deferred/TransactionRoundDefiningUpdate.php index 0054872cfac..d6efad07970 100644 --- a/includes/deferred/TransactionRoundDefiningUpdate.php +++ b/includes/deferred/TransactionRoundDefiningUpdate.php @@ -19,7 +19,7 @@ class TransactionRoundDefiningUpdate /** * @param callable $callback - * @param string $fname Calling method + * @param string $fname Calling method @phan-mandatory-param */ public function __construct( callable $callback, $fname = ISQLPlatform::CALLER_UNKNOWN ) { $this->callback = $callback;