1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Removed unnecessary is_object() check

This commit is contained in:
jan brunnert 2013-10-01 13:00:37 +02:00
parent a4e3921090
commit f64d6695ce

View File

@ -73,8 +73,8 @@ class OptimisticLockException extends ORMException
*/ */
public static function lockFailedVersionMismatch($entity, $expectedLockVersion, $actualLockVersion) public static function lockFailedVersionMismatch($entity, $expectedLockVersion, $actualLockVersion)
{ {
$expectedLockVersion = (is_object($expectedLockVersion) && $expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion; $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion;
$actualLockVersion = (is_object($actualLockVersion) && $actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion; $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion;
return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity); return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity);
} }