We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9058bc9 commit 1bd0de3Copy full SHA for 1bd0de3
src/QueryReflection/LazyQueryReflector.php
@@ -7,7 +7,7 @@
7
use PHPStan\Type\Type;
8
use staabm\PHPStanDba\Error;
9
10
-final class LazyQueryReflector implements QueryReflector
+final class LazyQueryReflector implements QueryReflector, RecordingReflector
11
{
12
/**
13
* @var callable():QueryReflector
@@ -51,6 +51,17 @@ public function setupDbaApi(?DbaApi $dbaApi): void
51
$this->dbaApi = $dbaApi;
52
}
53
54
+ public function getDatasource()
55
+ {
56
+ $this->reflector = $this->createReflector();
57
+
58
+ if ($this->reflector instanceof RecordingReflector) {
59
+ return $this->reflector->getDatasource();
60
+ }
61
62
+ return null;
63
64
65
private function createReflector(): QueryReflector
66
67
if (null === $this->reflector) {
0 commit comments