Skip to content

Commit

Permalink
Add(typehint): Add typehint to methods and void return to Doctrine_Qu…
Browse files Browse the repository at this point in the history
…ery_Abstract::clear()
  • Loading branch information
thePanz committed Oct 11, 2024
1 parent e7bbbb0 commit 5c857c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions lib/Doctrine/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ public static function create($conn = null, $class = null)
return new $class($conn);
}

/**
* Clears all the sql parts.
*/
protected function clear()
protected function clear(): void
{
$this->_preQueried = false;
$this->_pendingJoinConditions = array();
Expand Down
4 changes: 1 addition & 3 deletions lib/Doctrine/Query/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -1917,10 +1917,8 @@ public function offset($offset)

/**
* Resets all the sql parts.
*
* @return void
*/
protected function clear()
protected function clear(): void
{
$this->_sqlParts = array(
'select' => array(),
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/RawSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function __construct(Doctrine_Connection $connection = null, Doctrine_Hydrator_A
$this->useQueryCache(false);
}

protected function clear()
protected function clear(): void
{
$this->_preQueried = false;
$this->_pendingJoinConditions = array();
Expand Down Expand Up @@ -108,9 +108,9 @@ protected function _addDqlQueryPart($queryPartName, $queryPart, $append = false)
/**
* Add select parts to fields.
*
* @param $queryPart sting The name of the querypart
* @param $queryPart string The name of the querypart
*/
private function _parseSelectFields($queryPart)
private function _parseSelectFields(string $queryPart): void
{
preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
$this->fields = $m[1];
Expand Down

0 comments on commit 5c857c2

Please sign in to comment.