[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use callable type-hint instead of is_callable
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376871 ) Change subject: Use callable type-hint instead of is_callable .. Use callable type-hint instead of is_callable Change-Id: I46c5bd059ce0a24b3e32196ebb965db240b9c2cb --- M repo/includes/Content/DataUpdateAdapter.php 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: WMDE-leszek: Looks good to me, approved jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, approved diff --git a/repo/includes/Content/DataUpdateAdapter.php b/repo/includes/Content/DataUpdateAdapter.php index 16544e2..83663d3 100644 --- a/repo/includes/Content/DataUpdateAdapter.php +++ b/repo/includes/Content/DataUpdateAdapter.php @@ -41,11 +41,7 @@ * * @throws InvalidArgumentException */ - public function __construct( $doUpdateFunction /*...*/ ) { - if ( !is_callable( $doUpdateFunction ) ) { - throw new InvalidArgumentException( '$doUpdateFunction must be callable' ); - } - + public function __construct( callable $doUpdateFunction /*...*/ ) { $args = func_get_args(); array_shift( $args ); -- To view, visit https://gerrit.wikimedia.org/r/376871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46c5bd059ce0a24b3e32196ebb965db240b9c2cb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: WMDE-leszek Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use callable type-hint instead of is_callable
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/376871 ) Change subject: Use callable type-hint instead of is_callable .. Use callable type-hint instead of is_callable Change-Id: I46c5bd059ce0a24b3e32196ebb965db240b9c2cb --- M repo/includes/Content/DataUpdateAdapter.php 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/71/376871/1 diff --git a/repo/includes/Content/DataUpdateAdapter.php b/repo/includes/Content/DataUpdateAdapter.php index 16544e2..83663d3 100644 --- a/repo/includes/Content/DataUpdateAdapter.php +++ b/repo/includes/Content/DataUpdateAdapter.php @@ -41,11 +41,7 @@ * * @throws InvalidArgumentException */ - public function __construct( $doUpdateFunction /*...*/ ) { - if ( !is_callable( $doUpdateFunction ) ) { - throw new InvalidArgumentException( '$doUpdateFunction must be callable' ); - } - + public function __construct( callable $doUpdateFunction /*...*/ ) { $args = func_get_args(); array_shift( $args ); -- To view, visit https://gerrit.wikimedia.org/r/376871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46c5bd059ce0a24b3e32196ebb965db240b9c2cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits