| Conditions | 3 |
| Paths | 4 |
| Total Lines | 6 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 55 | 2 | public static function lockFailedVersionMismatch($entity, $expectedLockVersion, $actualLockVersion) |
|
| 56 | { |
||
| 57 | 2 | $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion; |
|
|
|
|||
| 58 | 2 | $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion; |
|
| 59 | |||
| 60 | 2 | return new self('The optimistic lock failed, version ' . $expectedLockVersion . ' was expected, but is actually ' . $actualLockVersion, $entity); |
|
| 61 | } |
||
| 73 |