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