1
0
mirror of synced 2025-03-03 19:33:22 +03:00

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:
flack 2014-04-28 11:20:43 +02:00 committed by Marco Pivetta
parent 5361676bba
commit b8ef3af982

View File

@ -1655,7 +1655,7 @@ class UnitOfWork implements PropertyChangedListener
case self::STATE_DETACHED:
// Can actually not happen right now since we assume STATE_NEW.
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persist");
default:
throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
@ -1726,7 +1726,7 @@ class UnitOfWork implements PropertyChangedListener
break;
case self::STATE_DETACHED:
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
throw ORMInvalidArgumentException::detachedEntityCannot($entity, "remove");
default:
throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
}