Test Failed
Pull Request — master (#2)
by Laurynas
43:45
created

EmailExistsException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getEntryId() 0 4 1
1
<?php namespace Qualia\Exceptions;
2
3
class EmailExistsException extends RequestException
4
{
5
    /**
6
     * @var array
7
     */
8
    private $entryId;
9
10
    public function __construct($entryId)
11
    {
12
        $this->entryId = $entryId;
13
        $this->message = "Entry with such email already exists, entry id: $entryId";
14
    }
15
16
    /**
17
     * Returns ID of the entry that has email you already submitted
18
     *
19
     * @return array
20
     */
21
    public function getEntryId()
22
    {
23
        return $this->entryId;
24
    }
25
}