InvalidDirectiveNameException::getErrorMessage()   A
last analyzed

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 InvalidDirectiveNameException extends BaseException
8
{
9
    const CODE = '0201';
10
11
    /**
12
     * Define as configuração para enviar o exception
13
     *
14
     * @param string $name
15
     */
16
    public function __construct(string $name)
17
    {
18
        $this->initialize($name);
19
    }
20
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function getErrorMessage() : string
25
    {
26
        return 'The [%s] is an invalid name. Its not possible to create an directive with special characters and start number.';
27
    }
28
29
    /**
30
     * {@inheritDoc}
31
     */
32
    public function getErrorCode() : string
33
    {
34
        return self::CODE;
35
    }
36
}
37