Skip to content

Commit

Permalink
Add getName on youth player
Browse files Browse the repository at this point in the history
  • Loading branch information
jetwitaussi committed Nov 5, 2021
1 parent b4c3f1a commit 8fb04a6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions PHT/Xml/Player/Youth.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@ public function getNickName()
return $this->getXml()->getElementsByTagName('NickName')->item(0)->nodeValue;
}

/**
* Return player full name
*
* @return string
*/
public function getName()
{
$name = $this->getFirstName() . ' ';
if ($this->getNickName() !== null && $this->getNickName() !== '') {
$name .= $this->getNickName() . ' ';
}
$name .= $this->getLastName();
return $name;
}

/**
* Return youth player age
*
Expand Down

0 comments on commit 8fb04a6

Please sign in to comment.