Failed Conditions
Branch feature/refactoring-samurai (8cc7c1)
by Giuliano
03:49
created

InvalidAuthorException::getErrorCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Maestriam\Samurai\Exceptions;
4
5
use Maestriam\Samurai\Exceptions\BaseException;
6
7
class InvalidAuthorException extends BaseException
8
{
9
    const CODE = '0104';
10
11
    public function __construct($author)
12
    {        
13
        $this->initialize($author);
14
    }
15
16
    /**
17
     * {@inheritDoc}
18
     */
19
    public function getErrorMessage() : string
20
    {
21
        return 'The author name [%s] is an invalid author name. E.g: Name <[email protected]>';
22
    }
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function getErrorCode() : string
28
    {
29
        return self::CODE;
30
    }
31
}
32