EqualsUsesWindUp::equals()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 2
nc 2
nop 1
1
<?php declare(strict_types=1);
2
namespace Kepawni\Twilted\Basic;
3
4
trait EqualsUsesWindUp
5
{
6
    /**
7
     * @param mixed $other Another value to test.
8
     *
9
     * @return bool True when the other value is equal to this instance.
10
     */
11
    public function equals($other): bool
12
    {
13
        return $other instanceof static && $this->windUp() === $other->windUp();
14
    }
15
16
    abstract public function windUp(): array;
17
}
18