Skip to content

Commit

Permalink
Fixed documentation and expiration date nullability in BanEntry, close
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jul 26, 2017
1 parent 7d77751 commit ed5f69f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/pocketmine/permission/BanEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
use pocketmine\utils\MainLogger;

class BanEntry{
/**
* @var string
*/
public static $format = "Y-m-d H:i:s O";

/** @var string */
Expand All @@ -34,7 +37,7 @@ class BanEntry{
private $creationDate = null;
/** @var string */
private $source = "(Unknown)";
/** @var \DateTime */
/** @var \DateTime|null */
private $expirationDate = null;
/** @var string */
private $reason = "Banned by an operator.";
Expand Down Expand Up @@ -64,14 +67,17 @@ public function setSource(string $source){
$this->source = $source;
}

public function getExpires() : \DateTime{
/**
* @return \DateTime|null
*/
public function getExpires(){
return $this->expirationDate;
}

/**
* @param \DateTime $date
* @param \DateTime|null $date
*/
public function setExpires(\DateTime $date){
public function setExpires(\DateTime $date = null){
$this->expirationDate = $date;
}

Expand Down

0 comments on commit ed5f69f

Please sign in to comment.