| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Ray\AuraSqlModule; |
||
| 6 | |||
| 7 | use Aura\Sql\ExtendedPdo; |
||
| 8 | use SensitiveParameter; |
||
|
0 ignored issues
–
show
|
|||
| 9 | |||
| 10 | final class Connection |
||
| 11 | { |
||
| 12 | private ?ExtendedPdo $pdo = null; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @phpstan-param array<string, mixed> $options |
||
| 16 | * @phpstan-param array<string> $queries |
||
| 17 | */ |
||
| 18 | public function __construct( |
||
| 19 | private readonly string $dsn, |
||
| 20 | private readonly string $username = '', |
||
| 21 | #[SensitiveParameter] |
||
| 22 | private readonly string $password = '', |
||
| 23 | /** @var array<string, mixed> */ |
||
| 24 | private readonly array $options = [], |
||
| 25 | /** @var array<string> */ |
||
| 26 | private readonly array $queries = [] |
||
| 27 | ) { |
||
| 28 | } |
||
| 29 | |||
| 30 | public function __invoke(): ExtendedPdo |
||
| 31 | { |
||
| 32 | if ($this->pdo instanceof ExtendedPdo) { |
||
| 33 | return $this->pdo; |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->pdo = new ExtendedPdo($this->dsn, $this->username, $this->password, $this->options, $this->queries); |
||
| 37 | |||
| 38 | return $this->pdo; |
||
|
0 ignored issues
–
show
|
|||
| 39 | } |
||
| 40 | } |
||
| 41 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths