These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the ICanBoogie package. |
||
5 | * |
||
6 | * (c) Olivier Laviale <[email protected]> |
||
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 | namespace ICanBoogie\HTTP; |
||
13 | |||
14 | /** |
||
15 | * Exception thrown in attempt to obtain a dispatcher when no provider is defined. |
||
16 | */ |
||
17 | View Code Duplication | class DispatcherProviderNotDefined extends \LogicException implements Exception |
|
0 ignored issues
–
show
|
|||
18 | { |
||
19 | const DEFAULT_MESSAGE = "No provider is defined yet. Please define one with `DispatcherProvider::define(\$provider)`."; |
||
20 | |||
21 | public function __construct($message = self::DEFAULT_MESSAGE, $code = Status::INTERNAL_SERVER_ERROR, \Exception $previous = null) |
||
22 | { |
||
23 | parent::__construct($message, $code, $previous); |
||
24 | } |
||
25 | } |
||
26 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.