From: Timo Tijhof Date: Fri, 5 Apr 2019 00:09:30 +0000 (+0100) Subject: jobqueue: Document Title as valid param type for compat (2) X-Git-Tag: 1.34.0-rc.0~2149 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=766549999c6edade0d57a8ec89584f772285e783;p=lhc%2Fweb%2Fwiklou.git jobqueue: Document Title as valid param type for compat (2) Follows-up 9b4938c40d02c, and 4bff6f1558. The latter of which updated ::factory() instead of __construct(). Oops. This should fix build failures that are preventing merges in repos where Phan is finding Job::__construct(string, Title) where it currently fails as follows: CompileArticleMetadataJob.php:11 PhanTypeMismatchArgument Argument 2 (params) is …\Title|string but \Job::__construct() takes array As Phan is reading the php doc I guess. Change-Id: I128d57ead6bcb9dbae99d41a1f23192c3f6fbdba --- diff --git a/includes/jobqueue/Job.php b/includes/jobqueue/Job.php index 0b5e62df89..55cb942a3f 100644 --- a/includes/jobqueue/Job.php +++ b/includes/jobqueue/Job.php @@ -106,7 +106,7 @@ abstract class Job implements IJobSpecification { /** * @param string $command - * @param array $params + * @param array|Title $params */ public function __construct( $command, $params = [] ) { if ( $params instanceof Title ) {