if ( count( $ids ) ) {
$ids = $this->filterIDs( [ [ $table, $field ] ], $ids );
- if ( !count( $ids ) ) {
+ if ( $ids === [] ) {
// Return nothing, no IDs are valid
$this->where[] = '0 = 1';
} else {
* @param string $prefix Module prefix
*/
public static function addTitleInfo( &$arr, $title, $prefix = '' ) {
- $arr[$prefix . 'ns'] = intval( $title->getNamespace() );
+ $arr[$prefix . 'ns'] = (int)$title->getNamespace();
$arr[$prefix . 'title'] = $title->getPrefixedText();
}
$result = $this->getResult();
ApiResult::setIndexedTagName( $data, $this->getModulePrefix() );
- return $result->addValue( [ 'query', 'pages', intval( $pageId ) ],
+ return $result->addValue( [ 'query', 'pages', (int)$pageId ],
$this->getModuleName(),
$data );
}