IsolateComparer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 16
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A areEqual() 0 7 3
1
<?php
2
3
namespace Isolate\Framework\UnitOfWork\Entity;
4
5
use Isolate\LazyObjects\WrappedObject;
6
use Isolate\UnitOfWork\Entity\Comparer;
7
8
class IsolateComparer extends Comparer
9
{
10
    /**
11
     * @param $firstEntity
12
     * @param $secondEntity
13
     * @return bool
14
     * @throws \Isolate\UnitOfWork\Exception\InvalidArgumentException
15
     */
16
    public function areEqual($firstEntity, $secondEntity)
17
    {
18
        $firstTarget = ($firstEntity instanceof WrappedObject) ? $firstEntity->getWrappedObject() : $firstEntity;
19
        $secondTarget = ($secondEntity instanceof WrappedObject) ? $secondEntity->getWrappedObject() : $secondEntity;
20
21
        return parent::areEqual($firstTarget, $secondTarget);
22
    }
23
}
24