Completed
Push — master ( f66325...242356 )
by Emily
02:14
created

StaticEquatableTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A equals() 0 4 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
    public function equals($object) : bool
27
    {
28
        return $object instanceof static;
29
    }
30
}
31