Completed
Pull Request — master (#1)
by Spencer
02:08
created

ScaleEngineTicket::isEqual()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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