Completed
Push — master ( f14030...b5bdc1 )
by Laurynas
38:14 queued 35:54
created

EmailExistsException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php namespace Qualia\Exceptions;
2
3
class EmailExistsException extends RequestException
4
{
5
    /**
6
     * @var array
7
     */
8
    private $entryId;
9
10 7
    public function __construct($entryId)
11
    {
12 7
        $this->entryId = $entryId;
13 7
        $this->message = "Entry with such email already exists, entry id: $entryId";
14 7
    }
15
16
    /**
17
     * Returns ID of the entry that has email you already submitted
18
     *
19
     * @return array
20
     */
21 6
    public function getEntryId()
22
    {
23 6
        return $this->entryId;
24
    }
25
}