Passed
Push — master ( ed297f...604ea4 )
by Giuliano
04:39
created

ThemeExistsException   A

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 getErrorCode() 0 3 1
A __construct() 0 3 1
A getErrorMessage() 0 3 1
1
<?php
2
3
namespace Maestriam\Samurai\Exceptions;
4
5
use Illuminate\Support\Facades\Lang;
6
use Maestriam\Samurai\Exceptions\BaseException;
7
8
class ThemeExistsException extends BaseException
9
{
10
    const CODE = '0103';
11
    
12
    /**
13
     * Define as configuração para enviar o exception
14
     *
15
     * @param string $name
16
     */
17
    public function __construct(string $theme)
18
    {
19
        $this->initialize($theme);
20
    }
21
22
    /**
23
     * {@inheritDoc}
24
     */
25
    public function getErrorMessage() : string
26
    {
27
        return 'The theme [%s] already exists in project.';
28
    }
29
30
    /**
31
     * {@inheritDoc}
32
     */
33
    public function getErrorCode() : string
34
    {
35
        return self::CODE;
36
    }
37
}
38