File tree 3 files changed +74
-1
lines changed 3 files changed +74
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ parameters:
38
38
- stubs/Collections/ArrayCollection.stub
39
39
- stubs/Collections/Collection.stub
40
40
- stubs/Collections/Selectable.stub
41
- - stubs/ORM/QueryBuilder.stub
42
41
- stubs/ORM/AbstractQuery.stub
43
42
- stubs/ORM/Mapping/ClassMetadata.stub
44
43
- stubs/ORM/Mapping/ClassMetadataInfo.stub
@@ -151,6 +150,13 @@ services:
151
150
descendIntoOtherMethods : %doctrine.searchOtherMethodsForQueryBuilderBeginning%
152
151
parser : @defaultAnalysisParser
153
152
153
+ -
154
+ class : PHPStan\Stubs\Doctrine\StubFilesExtensionLoader
155
+ tags :
156
+ - phpstan.stubFilesExtension
157
+ arguments :
158
+ bleedingEdge : %featureToggles.bleedingEdge%
159
+
154
160
doctrineQueryBuilderArgumentsProcessor :
155
161
class : PHPStan\Type\Doctrine\ArgumentsProcessor
156
162
autowired : false
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types = 1 );
2
+
3
+ namespace PHPStan \Stubs \Doctrine ;
4
+
5
+ use PHPStan \PhpDoc \StubFilesExtension ;
6
+ use function dirname ;
7
+
8
+ class StubFilesExtensionLoader implements StubFilesExtension
9
+ {
10
+
11
+ /** @var bool */
12
+ private $ bleedingEdge ;
13
+
14
+ public function __construct (
15
+ bool $ bleedingEdge
16
+ )
17
+ {
18
+ $ this ->bleedingEdge = $ bleedingEdge ;
19
+ }
20
+
21
+ public function getFiles (): array
22
+ {
23
+ $ path = dirname (dirname (dirname (__DIR__ ))) . '/stubs ' ;
24
+
25
+ if ($ this ->bleedingEdge === true ) {
26
+ $ path .= '/bleedingEdge ' ;
27
+ }
28
+
29
+ return [
30
+ $ path . '/ORM/QueryBuilder.stub ' ,
31
+ ];
32
+ }
33
+
34
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Doctrine\ORM;
4
+
5
+ class QueryBuilder
6
+ {
7
+
8
+ /**
9
+ * @return Query<mixed>
10
+ */
11
+ public function getQuery()
12
+ {
13
+ }
14
+
15
+ /**
16
+ * @param \Doctrine\Common\Collections\ArrayCollection<array-key, mixed>|array<mixed> $parameters
17
+ * @return static
18
+ */
19
+ public function setParameters($parameters)
20
+ {
21
+
22
+ }
23
+
24
+ /**
25
+ * @param literal-string|object|array<mixed> $predicates
26
+ * @return $this
27
+ */
28
+ public function where($predicates)
29
+ {
30
+
31
+ }
32
+
33
+ }
You can’t perform that action at this time.
0 commit comments