Test Failed
Branch master (cfe199)
by ANTHONIUS
03:28
created

CoreException::modulesFileNotFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
/*
4
 * This file is part of the EOffice project.
5
 *
6
 * (c) Anthonius Munthi <https://itstoni.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace EOffice\Core\Exception;
15
16
use EOffice\Contracts\Support\ModuleInterface;
17
18
class CoreException extends \Exception
19
{
20
    public static function modulesFileNotFound(string $path): self
21
    {
22
        return new self(sprintf(
23
            'Modules config "%s" file not exists.',
24
            $path
25
        ));
26
    }
27
28
    public static function moduleShouldImplementModuleInterface(string $class): self
29
    {
30
        return new self(sprintf(
31
            'Module class "%s" should implement "'.ModuleInterface::class.'"',
32
            $class
33
        ));
34
    }
35
}
36