Small clean-ups

This commit is contained in:
Vassyli
2018-01-10 08:22:28 +01:00
parent c9e6f679c4
commit 92c0f71ed6
6 changed files with 15 additions and 12 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ class GameConfiguration
/**
* Constructor.
* @param EntityManagerInterface $em
* @param EntityManagerInterface $entityManager
*/
public function __construct(EntityManagerInterface $entityManager)
{
@@ -42,7 +42,7 @@ class GameConfiguration
/**
* Sets and overwrites a configuration value saved by the name
* @param string $configurationName
* @param type $configurationValue
* @param mixed $configurationValue
*/
public function set(string $configurationName, $configurationValue)
{
+3 -2
View File
@@ -11,6 +11,7 @@ use Doctrine\ORM\Mapping\Table;
use LotGD\Core\Exceptions\InvalidModelException;
use LotGD\Core\Exceptions\ArgumentException;
use LotGD\Core\Exceptions\ParentAlreadySetException;
use LotGD\Core\Tools\Model\Deletor;
use LotGD\Core\Tools\Model\Saveable;
@@ -72,9 +73,9 @@ class Message
*
* This method has been made protected to prevent from accessing it directly. Use
* the static methods self::send() and self::sendSystemMessage() instead.
* @param \LotGD\Core\Models\Character $from
* @param CharacterInterface $from
* @param string $message
* @param \LotGD\Core\Models\Thread $thread
* @param MessageThread $thread
* @param bool $systemMessage
* @throws ArgumentException
*/
+3 -3
View File
@@ -36,10 +36,10 @@ class MessageThread implements SaveableInterface
/**
* Constructor. Sets the (unique) threadKey.
* @param string $threadKey
* @param type $participants
* @param type $readonly
* @param array $participants
* @param bool $readonly
*/
public function __construct(string $threadKey, array $participants, $readonly = false)
public function __construct(string $threadKey, array $participants, bool $readonly = false)
{
$this->threadKey = $threadKey;
$this->readonly = $readonly;
+3 -2
View File
@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace LotGD\Core\Models;
use DateTime;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Table;
use Doctrine\Common\Collections\ArrayCollection;
@@ -39,7 +40,7 @@ class Module implements SaveableInterface
public function __construct(string $library)
{
$this->properties = new ArrayCollection();
$this->createdAt = new \DateTime();
$this->createdAt = new DateTime();
$this->library = $library;
}
@@ -47,7 +48,7 @@ class Module implements SaveableInterface
* Returns the time this module was added to the system.
* @return DateTime
*/
public function getCreatedAt(): \DateTime
public function getCreatedAt(): DateTime
{
return $this->createdAt;
}
+3 -3
View File
@@ -67,7 +67,7 @@ class MotD implements CreateableInterface
* Returns always the real author of the message, even if it is a
* system message. Use $this->getSystemMessage() to check if it is a system
* message or $this->getAppearentAuthor() to get the appearent author.
* @return \LotGD\Core\Models\Character
* @return CharacterInterface
*/
public function getAuthor(): CharacterInterface
{
@@ -76,7 +76,7 @@ class MotD implements CreateableInterface
/**
* Returns the appearent author of this message.
* @return \LotGD\Core\Models\CharacterInterface
* @return CharacterInterface
*/
public function getApparantAuthor(): CharacterInterface
{
@@ -89,7 +89,7 @@ class MotD implements CreateableInterface
/**
* Sets the author of this motd
* @param \LotGD\Core\Models\Character $author
* @param Character $author
*/
public function setAuthor(Character $author)
{
+1
View File
@@ -46,6 +46,7 @@ class Permission implements CreateableInterface
/**
* Sets this entity's id if it's not set yet.
* @param string $id
* @throws ArgumentException
*/
public function setId(string $id)
{