mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Prepared refactoring of exceptions
This commit is contained in:
@@ -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!');
|
||||
|
Reference in New Issue
Block a user