Skip to content

Commit

Permalink
Fix php8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jetwitaussi committed Feb 15, 2025
1 parent c4fb8fa commit adeddf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use PHT\Utils;
use PHT\Config;

class Match extends Xml\Base
class HTMatch extends Xml\Base
{
private $type;

Expand Down
10 changes: 5 additions & 5 deletions PHT/Xml/World/League/Season/Round.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function getMatchNumber()
* Get round match object
*
* @param integer $index
* @return \PHT\Xml\World\League\Season\Match
* @return \PHT\Xml\World\League\Season\HTMatch
*/
public function getMatch($index)
{
Expand All @@ -56,21 +56,21 @@ public function getMatch($index)
$index -= Config\Config::$forIndex;
$match = new \DOMDocument('1.0', 'UTF-8');
$match->appendChild($match->importNode($this->getXml()->getElementsByTagName('Match')->item($index), true));
return new Xml\World\League\Season\Match($match, $this->type);
return new Xml\World\League\Season\HTMatch($match, $this->type);
}
return null;
}

/**
* Return iterator of round match objects
*
* @return \PHT\Xml\World\League\Season\Match[]
* @return \PHT\Xml\World\League\Season\HTMatch[]
*/
public function getMatches()
{
$nodes = $this->getXml()->getElementsByTagName('Match');
/** @var \PHT\Xml\World\League\Season\Match[] $data */
$data = new Utils\XmlIterator($nodes, '\PHT\Xml\World\League\Season\Match', $this->type);
/** @var \PHT\Xml\World\League\Season\HTMatch[] $data */
$data = new Utils\XmlIterator($nodes, '\PHT\Xml\World\League\Season\HTMatch', $this->type);
return $data;
}
}

0 comments on commit adeddf9

Please sign in to comment.