<?php
/**
- *
- *
- * Created on Oct 16, 2006
- *
* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
*/
private $rootTitle;
- private $params, $cont, $redirect;
+ private $params;
+ /** @var array */
+ private $cont;
+ private $redirect;
private $bl_ns, $bl_from, $bl_from_ns, $bl_table, $bl_code, $bl_title, $bl_fields, $hasNS;
/**
}
if ( is_null( $resultPageSet ) ) {
- $a = [ 'pageid' => intval( $row->page_id ) ];
+ $a = [ 'pageid' => (int)$row->page_id ];
ApiQueryBase::addTitleInfo( $a, $t );
if ( $row->page_is_redirect ) {
$a['redirect'] = true;
}
if ( is_null( $resultPageSet ) ) {
- $a['pageid'] = intval( $row->page_id );
+ $a = [ 'pageid' => (int)$row->page_id ];
ApiQueryBase::addTitleInfo( $a, Title::makeTitle( $row->page_namespace, $row->page_title ) );
if ( $row->page_is_redirect ) {
$a['redirect'] = true;
/**
* @param ApiPageSet $resultPageSet
* @return void
+ * @suppress PhanTypeInvalidDimOffset
*/
private function run( $resultPageSet = null ) {
$this->params = $this->extractRequestParams( false );
$this->params['limit'] = $this->getMain()->canApiHighLimits() ? $botMax : $userMax;
$result->addParsedLimit( $this->getModuleName(), $this->params['limit'] );
} else {
- $this->params['limit'] = intval( $this->params['limit'] );
+ $this->params['limit'] = (int)$this->params['limit'];
$this->validateLimit( 'limit', $this->params['limit'], 1, $userMax, $botMax );
}
if ( is_null( $resultPageSet ) ) {
// Try to add the result data in one go and pray that it fits
$code = $this->bl_code;
- $data = array_map( function ( $arr ) use ( $result, $code ) {
+ $data = array_map( function ( $arr ) use ( $code ) {
if ( isset( $arr['redirlinks'] ) ) {
$arr['redirlinks'] = array_values( $arr['redirlinks'] );
ApiResult::setIndexedTagName( $arr['redirlinks'], $code );