Completed
Push — master ( 499778...79f24a )
by Emily
9s
created

StaticEquatableTrait::equals()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * This file is part of the Composite Utils package.
4
 *
5
 * (c) Emily Shepherd <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the
8
 * LICENSE.md file that was distributed with this source code.
9
 *
10
 * @package spaark/composite-utils
11
 * @author Emily Shepherd <[email protected]>
12
 * @license MIT
13
 */
14
15
namespace Spaark\CompositeUtils\Traits;
16
17
/**
18
 * Equatable classes using this trait are deemed equal if they are the
19
 * same class
20
 */
21
trait StaticEquatableTrait
22
{
23
    /**
24
     * {@inheritDoc}
25
     */
26 3
    public function equals($object) : bool
27
    {
28 3
        return $object instanceof static;
29
    }
30
}
31