Prepared refactoring of exceptions

This commit is contained in:
Kevin Frantz
2019-04-14 21:53:39 +02:00
parent 0e1d5ea024
commit 48a98cfc63
22 changed files with 125 additions and 22 deletions

View File

@@ -54,7 +54,7 @@ class RequestedRight implements RequestedRightInterface
*/
private function validateRequestedEntity(): void
{
if ($this->requestedEntity->hasSlug() || $this->requestedEntity->hasId()) {
if ($this->requestedEntity->hasIdentity()) {
return;
}
throw new PreconditionFailedException(get_class($this->requestedEntity).' needs to have a defined attribut id or slug!');