Test Failed
Push — master ( cf589e...4e3804 )
by Grupo
02:17
created

ModuleAlreadyExists   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: thales
5
 * Date: 24/11/2018
6
 * Time: 22:46
7
 */
8
9
namespace Saci\Console\Domain\Exceptions;
10
11
12
class ModuleAlreadyExists extends \Exception
13
{
14
15
    public function __construct(string $moduleName = null, int $code = 0, \Exception $previous = null)
16
    {
17
        $message = 'Modulo já existe.';
18
19
        if (null ==! $moduleName) {
0 ignored issues
show
introduced by
The condition null == ! $moduleName is always false.
Loading history...
20
            $message = sprintf('Modulo "%s" já existe', $moduleName);
21
        }
22
23
        parent::__construct($message, $code, $previous);
24
    }
25
}