Finished refactoring of exceptions

This commit is contained in:
Kevin Frantz
2019-04-15 01:37:17 +02:00
parent 9f179ead73
commit 06f69675ac
49 changed files with 159 additions and 135 deletions

View File

@@ -19,6 +19,7 @@ trait ActionTypeAttribut
/**
* @param string $actionType
*
* @throws InvalidChoiceTypeException
*/
public function setActionType(string $actionType): void

View File

@@ -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

View File

@@ -7,6 +7,7 @@ use Infinito\Exception\Type\InvalidChoiceTypeException;
/**
* @author kevinfrantz
*
* @see CrudAttributInterface
*/
trait CrudAttribut

View File

@@ -20,8 +20,8 @@ trait LayerAttribut
protected $layer;
/**
*
* @param string $layer
*
* @throws InvalidChoiceTypeException
*/
public function setLayer(string $layer): void

View File

@@ -18,8 +18,9 @@ trait SlugAttribut
/**
* @todo Maybe throw an other Exception here?
*
* @param string $slug
*
*
* @throws ValueInvalidException
*/
public function setSlug(string $slug): void