Some minor documentation cleanup (e.g. converted C# comments to PHPDocumentor comments)

This commit is contained in:
Jeff Moser
2010-10-08 21:44:36 -04:00
parent f863e150d4
commit d2fc7dc5c7
22 changed files with 174 additions and 159 deletions

View File

@ -5,9 +5,9 @@ require_once(dirname(__FILE__) . "/Guard.php");
require_once(dirname(__FILE__) . "/ISupportPartialPlay.php");
require_once(dirname(__FILE__) . "/ISupportPartialUpdate.php");
/// <summary>
/// Represents a player who has a <see cref="Rating"/>.
/// </summary>
/**
* Represents a player who has a Rating.
*/
class Player implements ISupportPartialPlay, ISupportPartialUpdate
{
const DEFAULT_PARTIAL_PLAY_PERCENTAGE = 1.0; // = 100% play time
@ -17,12 +17,13 @@ class Player implements ISupportPartialPlay, ISupportPartialUpdate
private $_PartialPlayPercentage;
private $_PartialUpdatePercentage;
/// <summary>
/// Constructs a player.
/// </summary>
/// <param name="id">The identifier for the player, such as a name.</param>
/// <param name="partialPlayPercentage">The weight percentage to give this player when calculating a new rank.</param>
/// <param name="partialUpdatePercentage">/// Indicated how much of a skill update a player should receive where 0 represents no update and 1.0 represents 100% of the update.</param>
/**
* Constructs a player.
*
* @param mixed $id The identifier for the player, such as a name.
* @param number $partialPlayPercentage The weight percentage to give this player when calculating a new rank.
* @param number $partialUpdatePercentage Indicated how much of a skill update a player should receive where 0 represents no update and 1.0 represents 100% of the update.
*/
public function __construct($id,
$partialPlayPercentage = self::DEFAULT_PARTIAL_PLAY_PERCENTAGE,
$partialUpdatePercentage = self::DEFAULT_PARTIAL_UPDATE_PERCENTAGE)
@ -35,39 +36,31 @@ class Player implements ISupportPartialPlay, ISupportPartialUpdate
$this->_PartialUpdatePercentage = $partialUpdatePercentage;
}
/// <summary>
/// The identifier for the player, such as a name.
/// </summary>
/**
* The identifier for the player, such as a name.
*/
public function &getId()
{
$id = &$this->_Id;
return $this->_Id;
}
#region ISupportPartialPlay Members
/// <summary>
/// Indicates the percent of the time the player should be weighted where 0.0 indicates the player didn't play and 1.0 indicates the player played 100% of the time.
/// </summary>
/**
* Indicates the percent of the time the player should be weighted where 0.0 indicates the player didn't play and 1.0 indicates the player played 100% of the time.
*/
public function getPartialPlayPercentage()
{
return $this->_PartialPlayPercentage;
}
#endregion
#region ISupportPartialUpdate Members
/// <summary>
/// Indicated how much of a skill update a player should receive where 0.0 represents no update and 1.0 represents 100% of the update.
/// </summary>
/**
* Indicated how much of a skill update a player should receive where 0.0 represents no update and 1.0 represents 100% of the update.
*/
public function getPartialUpdatePercentage()
{
return $this->_PartialUpdatePercentage;
}
#endregion
public function __toString()
{
if ($this->_Id != null)