InvalidTypeDirectiveException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getErrorMessage() 0 3 1
A __construct() 0 3 1
A getErrorCode() 0 3 1
1
<?php
2
3
namespace Maestriam\Samurai\Exceptions;
4
5
use Maestriam\Samurai\Exceptions\BaseException;
6
7
class InvalidTypeDirectiveException extends BaseException
8
{
9
    const CODE = '0203';
10
11
    /**
12
     * Define as configuração para enviar o exception
13
     *
14
     * @param string $type
15
     */
16
    public function __construct(string $type)
17
    {
18
        $this->initialize($type);
19
    }
20
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function getErrorMessage() : string
25
    {
26
        return 'The [%s] is a invalid type.';
27
    }
28
29
    /**
30
     * {@inheritDoc}
31
     */
32
    public function getErrorCode() : string
33
    {
34
        return self::CODE;
35
    }
36
}
37