Completed
Push — master ( 7942ad...1c8947 )
by WEBEWEB
01:50
created

PHPExtensionNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
/**
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2017 WEBEWEB
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 WBW\Library\Core\Exception\Extension;
13
14
use Exception;
15
use WBW\Library\Core\Exception\AbstractCoreException;
16
17
/**
18
 * PHP extension not found exception.
19
 *
20
 * @author webeweb <https://github.com/webeweb/>
21
 * @package WBW\Library\Core\Exception\Extension
22
 * @final
23
 */
24
final class PHPExtensionNotFoundException extends AbstractCoreException {
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param string $extension The extension.
30
     * @param Exception $previous The previous exception.
31
     */
32
    public function __construct($extension, Exception $previous = null) {
33
        parent::__construct(sprintf("The PHP extension \"%s\" is not found", $extension), $previous);
34
    }
35
36
}
37