* PageUpdater: Plain class type hints never needed Assert,
not sure why that was here.
* CategoryMembershipChange: The 'callable' typehint was introduced
in PHP 5.4.
Change-Id: I958bd63a7f9edec3a297f34fe43339fac5f43006
// Defend against mistakes caused by differences with the
// signature of WikiPage::doEditContent.
Assert::parameterType( 'integer', $flags, '$flags' );
- Assert::parameterType( 'CommentStoreComment', $summary, '$summary' );
if ( $this->wasCommitted() ) {
throw new RuntimeException( 'saveRevision() has already been called on this PageUpdater!' );
* @since 1.27
*/
-use Wikimedia\Assert\Assert;
-
class CategoryMembershipChange {
const CATEGORY_ADDITION = 1;
*
* @throws MWException
*/
- public function overrideNewForCategorizationCallback( $callback ) {
+ public function overrideNewForCategorizationCallback( callable $callback ) {
if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
throw new MWException( 'Cannot override newForCategorization callback in operation.' );
}
- Assert::parameterType( 'callable', $callback, '$callback' );
$this->newForCategorizationCallback = $callback;
}