Implemented tests for EntityDomService and refactored code

This commit is contained in:
Kevin Frantz
2019-04-02 18:52:11 +02:00
parent 70a117c927
commit 62aaa2d686
4 changed files with 63 additions and 5 deletions

View File

@@ -2,6 +2,11 @@
namespace Infinito\Attribut;
/**
* @author kevinfrantz
*
* @see TextAttributInterface
*/
trait TextAttribut
{
/**
@@ -9,11 +14,17 @@ trait TextAttribut
*/
protected $text;
/**
* @return string
*/
public function getText(): string
{
return $this->text;
}
/**
* @param string $text
*/
public function setText(string $text): void
{
$this->text = $text;

View File

@@ -9,6 +9,11 @@ use Infinito\Entity\UserInterface;
*/
interface UserAttributInterface
{
/**
* @var string
*/
public const USER_ATTRIBUT_NAME = 'user';
/**
* @param UserInterface $user
*/