File tree Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,8 @@ class Query extends AbstractQuery
149149 */
150150 private $ parserResult ;
151151
152- /** @var AbstractSqlExecutor */
153- private $ sqlExecutor = null ;
152+ /** @var ? AbstractSqlExecutor */
153+ private $ sqlExecutor ;
154154
155155 /**
156156 * The first result to return (the "offset").
Original file line number Diff line number Diff line change @@ -28,16 +28,16 @@ class ParserResult
2828 /**
2929 * The SQL executor used for executing the SQL.
3030 *
31- * @var AbstractSqlExecutor
31+ * @var ? AbstractSqlExecutor
3232 */
3333 private $ sqlExecutor ;
3434
3535 /**
3636 * The SQL executor used for executing the SQL.
3737 *
38- * @var SqlFinalizer
38+ * @var ? SqlFinalizer
3939 */
40- private $ sqlFinalizer = null ;
40+ private $ sqlFinalizer ;
4141
4242 /**
4343 * The ResultSetMapping that describes how to map the SQL result set.
@@ -101,6 +101,10 @@ public function setSqlExecutor($executor)
101101 */
102102 public function getSqlExecutor ()
103103 {
104+ if ($ this ->sqlExecutor === null ) {
105+ throw new RuntimeException ('This ParserResult was not created with an SqlExecutor ' );
106+ }
107+
104108 return $ this ->sqlExecutor ;
105109 }
106110
Original file line number Diff line number Diff line change 14451445 <InvalidArgument >
14461446 <code >$sqlParams</code >
14471447 </InvalidArgument >
1448+ <InvalidNullableReturnType >
1449+ <code >AbstractSqlExecutor</code >
1450+ </InvalidNullableReturnType >
14481451 <LessSpecificReturnStatement >
1449- <code ><![CDATA[ $this->parse()-> getSqlExecutor()->getSqlStatements()]]> </code >
1452+ <code ><![CDATA[ $this->getSqlExecutor()->getSqlStatements()]]> </code >
14501453 </LessSpecificReturnStatement >
14511454 <MoreSpecificReturnType >
14521455 <code ><![CDATA[ list<string>|string]]> </code >
14531456 </MoreSpecificReturnType >
1457+ <NullableReturnStatement >
1458+ <code ><![CDATA[ $this->sqlExecutor]]> </code >
1459+ </NullableReturnStatement >
14541460 <PossiblyNullArgument >
14551461 <code ><![CDATA[ $this->getDQL()]]> </code >
14561462 </PossiblyNullArgument >
18661872 <code ><![CDATA[ $this->_sqlStatements = &$this->sqlStatements]]> </code >
18671873 </UnsupportedPropertyReferenceUsage >
18681874 </file >
1875+ <file src =" lib/Doctrine/ORM/Query/Exec/FinalizedSelectExecutor.php" >
1876+ <PossiblyInvalidArgument >
1877+ <code ><![CDATA[ $this->getSqlStatements()]]> </code >
1878+ </PossiblyInvalidArgument >
1879+ <PropertyNotSetInConstructor >
1880+ <code >FinalizedSelectExecutor</code >
1881+ <code >FinalizedSelectExecutor</code >
1882+ </PropertyNotSetInConstructor >
1883+ </file >
18691884 <file src =" lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php" >
18701885 <InvalidReturnStatement >
18711886 <code >$numDeleted</code >
You can’t perform that action at this time.
0 commit comments