mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Finished refactoring of exceptions
This commit is contained in:
@@ -19,6 +19,7 @@ trait ActionTypeAttribut
|
||||
|
||||
/**
|
||||
* @param string $actionType
|
||||
*
|
||||
* @throws InvalidChoiceTypeException
|
||||
*/
|
||||
public function setActionType(string $actionType): void
|
||||
|
@@ -1,25 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Attribut;
|
||||
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @see ClassAttributInterface
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
trait ClassAttribut
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $class;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $class
|
||||
*/
|
||||
public function setClass(string $class): void
|
||||
@@ -29,11 +26,10 @@ trait ClassAttribut
|
||||
|
||||
return;
|
||||
}
|
||||
throw new NotFoundHttpException('Class ' . $class . ' couldn\'t be found!');
|
||||
throw new NotFoundHttpException('Class '.$class.' couldn\'t be found!');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClass(): string
|
||||
@@ -42,7 +38,6 @@ trait ClassAttribut
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasClass(): bool
|
||||
|
@@ -7,6 +7,7 @@ use Infinito\Exception\Type\InvalidChoiceTypeException;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @see CrudAttributInterface
|
||||
*/
|
||||
trait CrudAttribut
|
||||
|
@@ -20,8 +20,8 @@ trait LayerAttribut
|
||||
protected $layer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $layer
|
||||
*
|
||||
* @throws InvalidChoiceTypeException
|
||||
*/
|
||||
public function setLayer(string $layer): void
|
||||
|
@@ -18,8 +18,9 @@ trait SlugAttribut
|
||||
|
||||
/**
|
||||
* @todo Maybe throw an other Exception here?
|
||||
*
|
||||
* @param string $slug
|
||||
*
|
||||
*
|
||||
* @throws ValueInvalidException
|
||||
*/
|
||||
public function setSlug(string $slug): void
|
||||
|
Reference in New Issue
Block a user