GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (910)

framework/db/Exception.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * @link https://www.yiiframework.com/
4
 * @copyright Copyright (c) 2008 Yii Software LLC
5
 * @license https://www.yiiframework.com/license/
6
 */
7
8
namespace yii\db;
9
10
/**
11
 * Exception represents an exception that is caused by some DB-related operations.
12
 *
13
 * @author Qiang Xue <[email protected]>
14
 * @since 2.0
15
 */
16
class Exception extends \yii\base\Exception
17
{
18
    /**
19
     * @var array the error info provided by a PDO exception. This is the same as returned
20
     * by [PDO::errorInfo](https://www.php.net/manual/en/pdo.errorinfo.php).
21
     */
22
    public $errorInfo = [];
23
24
25
    /**
26
     * Constructor.
27
     * @param string $message PDO error message
28
     * @param array $errorInfo PDO error info
29
     * @param string $code PDO error code
30
     * @param \Throwable|null $previous The previous exception used for the exception chaining.
31
     */
32 59
    public function __construct($message, $errorInfo = [], $code = '', $previous = null)
33
    {
34 59
        parent::__construct($message, 0, $previous);
35 59
        $this->errorInfo = $errorInfo;
36 59
        $this->code = $code;
37
    }
38
39
    /**
40
     * @return string the user-friendly name of this exception
41
     */
42
    public function getName()
43
    {
44
        return 'Database Exception';
45
    }
46
47
    /**
48
     * @return string readable representation of exception
49
     */
50 3
    public function __toString()
51
    {
52 3
        return parent::__toString() . PHP_EOL
53 3
        . 'Additional Information:' . PHP_EOL . print_r($this->errorInfo, true);
0 ignored issues
show
Are you sure print_r($this->errorInfo, true) of type string|true can be used in concatenation? ( Ignorable by Annotation )

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

53
        . 'Additional Information:' . PHP_EOL . /** @scrutinizer ignore-type */ print_r($this->errorInfo, true);
Loading history...
54
    }
55
}
56