Small grammar fix
The exception was reading ``` A detached entity was found during {removed|persisted} [entityName] ``` I changed the verbs to infinitive now. Alternatively, the text in ``ORMInvalidArgumentException::detachedEntityCannot`` could also be changed to read ``` Detached entity [entityName] cannot be {removed|persisted} ```
This commit is contained in:
parent
5361676bba
commit
b8ef3af982
@ -1655,7 +1655,7 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
|
|
||||||
case self::STATE_DETACHED:
|
case self::STATE_DETACHED:
|
||||||
// Can actually not happen right now since we assume STATE_NEW.
|
// Can actually not happen right now since we assume STATE_NEW.
|
||||||
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
|
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persist");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
|
throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
|
||||||
@ -1726,7 +1726,7 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case self::STATE_DETACHED:
|
case self::STATE_DETACHED:
|
||||||
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
|
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "remove");
|
||||||
default:
|
default:
|
||||||
throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
|
throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user