GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — bugfix/5.4build ( 31a631 )
by Szurovecz
08:38
created

AbstractAggregateId::equals()   B

Complexity

Conditions 6
Paths 6

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 8.8571
cc 6
eloc 7
nc 6
nop 1
1
<?php
2
3
namespace predaddy\domain;
4
5
use precore\lang\Object;
6
use precore\lang\ObjectInterface;
7
use precore\util\Objects;
8
9
/**
10
 * Can be used as parent of a class which implements {@link AggregateId}.
11
 *
12
 * @package predaddy\domain
13
 * @author Janos Szurovecz <[email protected]>
14
 */
15
abstract class AbstractAggregateId extends Object implements AggregateId
16
{
17
    final public function equals(ObjectInterface $object = null)
18
    {
19
        if ($object === $this) {
20
            return true;
21
        }
22
        /* @var $object AbstractAggregateId */
23
        return $object !== null
24
        && ($this->getClassName() === $object->getClassName() || $object instanceof GenericAggregateId)
25
        && $this->value() === $object->value()
26
        && $this->aggregateClass() === $object->aggregateClass();
27
    }
28
29
    final public function toString()
30
    {
31
        return Objects::toStringHelper($this)
32
            ->add($this->value())
33
            ->add($this->aggregateClass())
34
            ->toString();
35
    }
36
}
37