mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized Tests and attributes
This commit is contained in:
@@ -7,6 +7,8 @@ use App\Exception\NoValidChoiceException;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @see LayerAttributInterface
|
||||
*/
|
||||
trait LayerAttribut
|
||||
{
|
||||
@@ -25,7 +27,7 @@ trait LayerAttribut
|
||||
public function setLayer(string $layer): void
|
||||
{
|
||||
if (!array_key_exists($layer, LayerType::getChoices())) {
|
||||
throw new NoValidChoiceException();
|
||||
throw new NoValidChoiceException("'$layer' is not a correct layer type.");
|
||||
}
|
||||
$this->layer = $layer;
|
||||
}
|
||||
|
Reference in New Issue
Block a user