Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
QueryBuilderEscapeException
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2/**
3 * This file is part of the sshilko/php-sql-mydb package.
4 *
5 * (c) Sergei Shilko <contact@sshilko.com>
6 *
7 * MIT License
8 *
9 * For the full copyright and license information, please view the LICENSE
10 * file that was distributed with this source code.
11 * @license https://opensource.org/licenses/mit-license.php MIT
12 */
13
14declare(strict_types = 1);
15
16namespace sql\MydbException;
17
18use sql\MydbException;
19use Throwable;
20use function sprintf;
21
22/**
23 * @author Sergei Shilko <contact@sshilko.com>
24 * @license https://opensource.org/licenses/mit-license.php MIT
25 * @category exceptions
26 * @see https://github.com/sshilko/php-sql-mydb
27 */
28class QueryBuilderEscapeException extends MydbException
29{
30    protected const MESSAGE_TEMPLATE = 'Failed to escape value: %s';
31
32    public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
33    {
34        parent::__construct(sprintf(self::MESSAGE_TEMPLATE, $message), $code, $previous);
35    }
36}