mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Implemented draft for PureSourceCreateType Test and adapted classes to it
This commit is contained in:
@@ -4,6 +4,8 @@ namespace App\Attribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @see IdAttributInterface
|
||||
*/
|
||||
trait IdAttribut
|
||||
{
|
||||
@@ -12,16 +14,25 @@ trait IdAttribut
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
*/
|
||||
public function setId(int $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasId(): bool
|
||||
{
|
||||
return isset($this->id);
|
||||
|
@@ -13,9 +13,14 @@ interface IdAttributInterface
|
||||
public function setId(int $id): void;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* Don't use this function to check if an id is set.
|
||||
* Use instead:.
|
||||
*
|
||||
* @see self::hasId()
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId(): int;
|
||||
public function getId(): ?int;
|
||||
|
||||
/**
|
||||
* @return bool Checks if attribute is set
|
||||
|
@@ -30,9 +30,9 @@ trait SlugAttribut
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSlug(): string
|
||||
public function getSlug(): ?string
|
||||
{
|
||||
return $this->slug;
|
||||
}
|
||||
|
@@ -15,9 +15,14 @@ interface SlugAttributInterface
|
||||
public function setSlug(string $slug): void;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* Don't use this function to check if a slug is set
|
||||
* Use instead:.
|
||||
*
|
||||
* @see self::hasSlug()
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSlug(): string;
|
||||
public function getSlug(): ?string;
|
||||
|
||||
/**
|
||||
* @return bool Checks if a slug is set
|
||||
|
Reference in New Issue
Block a user