InvalidParameterException
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 0
lcom 0
cbo 0
dl 0
loc 3
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\NotificationBundle\Exception;
15
16
use Sonata\CoreBundle\Exception\InvalidParameterException as CoreBundleException;
17
18
if (class_exists(CoreBundleException::class)) {
19
    class InvalidParameterException extends CoreBundleException
20
    {
21
    }
22
} else {
23
    class InvalidParameterException extends \RuntimeException
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Sonata\NotificationBundl...validParameterException has been defined more than once; this definition is ignored, only the first definition in this file (L19-21) is considered.

This check looks for classes that have been defined more than once in the same file.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
24
    {
25
    }
26
}
27