Issues (265)

src/Exception/HandlerException.php (1 issue)

Labels
Severity
1
<?php
2
3
/**
4
 * This file is part of Cycle ORM package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Cycle\Database\Exception;
13
14
/**
15
 * Schema sync related exception.
16
 */
17
class HandlerException extends DriverException implements StatementExceptionInterface
18
{
19
    public function __construct(StatementException $e)
20
    {
21
        parent::__construct($e->getMessage(), (int) $e->getCode(), $e);
22 10
    }
23
24 10
    public function getQuery(): string
25 10
    {
26
        return $this->getPrevious()->getQuery();
0 ignored issues
show
The method getQuery() does not exist on Exception. It seems like you code against a sub-type of Exception such as Cycle\Database\Exception\HandlerException or Cycle\Database\Exception\StatementException. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

26
        return $this->getPrevious()->/** @scrutinizer ignore-call */ getQuery();
Loading history...
27
    }
28
}
29