ScaleEngineTicket   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isEqual() 0 4 1
1
<?php
2
namespace FloSports\ScaleEngine\Model;
3
4
use Guzzle\Service\Resource\Model;
5
6
/**
7
 * Represents a ticket from ScaleEngine's API.
8
 */
9
class ScaleEngineTicket extends Model
10
{
11
    /**
12
     * Compare this ticket against another to see whether it references the
13
     * same ticket in ScaleEngine.
14
     *
15
     * For the purposes of this comparison, only the key's have to match.
16
     *
17
     * @param self $other The other ticket to compare against.
18
     * @return boolean Whether the tickets reference the same ticket in
19
     *     ScaleEngine or not.
20
     */
21
    public function isEqual(ScaleEngineTicket $other)
22
    {
23
        return $this['key'] === $other['key'];
24
    }
25
}
26