Skip to content

Commit

Permalink
(tests) Cast TestsuiteEntry::$id to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardspec committed Jan 7, 2025
1 parent b413e6e commit 3134be6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/framework/ModerationTestsuiteEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
Extension:Moderation - MediaWiki extension.
Copyright (C) 2015-2024 Edward Chernenko.
Copyright (C) 2015-2025 Edward Chernenko.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,7 +34,7 @@
* Represents one line on [[Special:Moderation]]
*/
class ModerationTestsuiteEntry {
/** @var string|null */
/** @var int|null */
public $id = null;

/** @var string|null */
Expand Down Expand Up @@ -280,7 +280,7 @@ public function __construct( DomElement $span ) {

$matches = null;
preg_match( '/modid=([0-9]+)/', $this->getAnyLink(), $matches );
$this->id = $matches[1];
$this->id = (int)$matches[1];

// Save the entire entry as HTML (not really used in tests, but handy for troubleshooting)
$this->rawHTML = $span->ownerDocument->saveXML( $span );
Expand Down

0 comments on commit 3134be6

Please sign in to comment.