Skip to content

Commit 5c857c2

Browse files
committed
Add(typehint): Add typehint to methods and void return to Doctrine_Query_Abstract::clear()
1 parent e7bbbb0 commit 5c857c2

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

lib/Doctrine/Query.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,7 @@ public static function create($conn = null, $class = null)
187187
return new $class($conn);
188188
}
189189

190-
/**
191-
* Clears all the sql parts.
192-
*/
193-
protected function clear()
190+
protected function clear(): void
194191
{
195192
$this->_preQueried = false;
196193
$this->_pendingJoinConditions = array();

lib/Doctrine/Query/Abstract.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -1917,10 +1917,8 @@ public function offset($offset)
19171917

19181918
/**
19191919
* Resets all the sql parts.
1920-
*
1921-
* @return void
19221920
*/
1923-
protected function clear()
1921+
protected function clear(): void
19241922
{
19251923
$this->_sqlParts = array(
19261924
'select' => array(),

lib/Doctrine/RawSql.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function __construct(Doctrine_Connection $connection = null, Doctrine_Hydrator_A
5757
$this->useQueryCache(false);
5858
}
5959

60-
protected function clear()
60+
protected function clear(): void
6161
{
6262
$this->_preQueried = false;
6363
$this->_pendingJoinConditions = array();
@@ -108,9 +108,9 @@ protected function _addDqlQueryPart($queryPartName, $queryPart, $append = false)
108108
/**
109109
* Add select parts to fields.
110110
*
111-
* @param $queryPart sting The name of the querypart
111+
* @param $queryPart string The name of the querypart
112112
*/
113-
private function _parseSelectFields($queryPart)
113+
private function _parseSelectFields(string $queryPart): void
114114
{
115115
preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
116116
$this->fields = $m[1];

0 commit comments

Comments
 (0)