Skip to content

Commit

Permalink
Rename Match class for php8 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
jetwitaussi committed Nov 5, 2021
1 parent f784127 commit 0e09c25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use PHT\Utils;
use PHT\Wrapper;

class Match extends Xml\User\Bookmark\Element
class HTMatch extends Xml\User\Bookmark\Element
{
/**
* Return teams names
Expand Down
20 changes: 10 additions & 10 deletions PHT/Xml/User/Bookmarks.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function getBookmarkSeniorMatchNumber()
* Return bookmark match object
*
* @param integer $index
* @return \PHT\Xml\User\Bookmark\Match
* @return \PHT\Xml\User\Bookmark\HTMatch
*/
public function getBookmarkSeniorMatch($index)
{
Expand All @@ -189,15 +189,15 @@ public function getBookmarkSeniorMatch($index)
$nodeList = $xpath->query('//BookmarkTypeID[.="' . Config\Config::BOOKMARK_SENIOR_MATCH . '"]');
$bookmark = new \DOMDocument('1.0', 'UTF-8');
$bookmark->appendChild($bookmark->importNode($nodeList->item($index)->parentNode, true));
return new Bookmark\Match($bookmark);
return new Bookmark\HTMatch($bookmark);
}
return null;
}

/**
* Return iterator of bookmark match objects
*
* @return \PHT\Xml\User\Bookmark\Match[]
* @return \PHT\Xml\User\Bookmark\HTMatch[]
*/
public function getBookmarkSeniorMatches()
{
Expand All @@ -208,8 +208,8 @@ public function getBookmarkSeniorMatches()
$bookmark->appendChild($bookmark->importNode($nodeList->item($i)->parentNode, true));
}
$nodes = $bookmark->getElementsByTagName('Bookmark');
/** @var \PHT\Xml\User\Bookmark\Match[] $data */
$data = new Utils\XmlIterator($nodes, '\PHT\Xml\User\Bookmark\Match');
/** @var \PHT\Xml\User\Bookmark\HTMatch[] $data */
$data = new Utils\XmlIterator($nodes, '\PHT\Xml\User\Bookmark\HTMatch');
return $data;
}

Expand Down Expand Up @@ -428,7 +428,7 @@ public function getBookmarkYouthMatchNumber()
* Return bookmark match object
*
* @param integer $index
* @return \PHT\Xml\User\Bookmark\Match
* @return \PHT\Xml\User\Bookmark\HTMatch
*/
public function getBookmarkYouthMatch($index)
{
Expand All @@ -439,15 +439,15 @@ public function getBookmarkYouthMatch($index)
$nodeList = $xpath->query('//BookmarkTypeID[.="' . Config\Config::BOOKMARK_YOUTH_MATCH . '"]');
$bookmark = new \DOMDocument('1.0', 'UTF-8');
$bookmark->appendChild($bookmark->importNode($nodeList->item($index)->parentNode, true));
return new Bookmark\Match($bookmark);
return new Bookmark\HTMatch($bookmark);
}
return null;
}

/**
* Return iterator of bookmark match objects
*
* @return \PHT\Xml\User\Bookmark\Match[]
* @return \PHT\Xml\User\Bookmark\HTMatch[]
*/
public function getBookmarkYouthMatches()
{
Expand All @@ -458,8 +458,8 @@ public function getBookmarkYouthMatches()
$bookmark->appendChild($bookmark->importNode($nodeList->item($i)->parentNode, true));
}
$nodes = $bookmark->getElementsByTagName('Bookmark');
/** @var \PHT\Xml\User\Bookmark\Match[] $data */
$data = new Utils\XmlIterator($nodes, '\PHT\Xml\User\Bookmark\Match');
/** @var \PHT\Xml\User\Bookmark\HTMatch[] $data */
$data = new Utils\XmlIterator($nodes, '\PHT\Xml\User\Bookmark\HTMatch');
return $data;
}

Expand Down

0 comments on commit 0e09c25

Please sign in to comment.