ConfigException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidDefaultConfig() 0 3 1
A configDoesNotExist() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the FOSCKEditor Bundle.
5
 *
6
 * (c) 2018 - present  Friends of Symfony
7
 * (c) 2009 - 2017     Eric GELOEN <[email protected]>
8
 *
9
 * For the full copyright and license information, please read the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace FOS\CKEditorBundle\Exception;
14
15
use RuntimeException;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
final class ConfigException extends RuntimeException implements FOSCKEditorException
21
{
22
    public static function configDoesNotExist(string $name): self
23
    {
24
        return new static(sprintf('The CKEditor config "%s" does not exist.', $name));
25
    }
26
27
    public static function invalidDefaultConfig(string $name): self
28
    {
29
        return new static(sprintf('The default config "%s" does not exist.', $name));
30
    }
31
}
32