Skip to content

Commit

Permalink
Merge pull request #118 from moufmouf/improve_typehints
Browse files Browse the repository at this point in the history
Improving type-hints
  • Loading branch information
moufmouf committed Mar 13, 2019
2 parents 1a4666a + ddcd49b commit 63a2071
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Utils/TDBMDaoGenerator.php
Expand Up @@ -291,7 +291,7 @@ public function save($beanClassWithoutNameSpace \$obj): void
*
* @return {$beanClassWithoutNameSpace}[]|ResultIterator
*/
public function findAll() : iterable
public function findAll() : ResultIterator
{
if (\$this->defaultSort) {
\$orderBy = '$tableName.'.\$this->defaultSort.' '.\$this->defaultDirection;
Expand Down Expand Up @@ -348,7 +348,7 @@ public function delete($beanClassWithoutNameSpace \$obj, bool \$cascade = false)
* @param int|null \$mode Either TDBMService::MODE_ARRAY or TDBMService::MODE_CURSOR (for large datasets). Defaults to TDBMService::MODE_ARRAY.
* @return {$beanClassWithoutNameSpace}[]|ResultIterator
*/
protected function find(\$filter = null, array \$parameters = [], \$orderBy=null, array \$additionalTablesFetch = [], ?int \$mode = null) : iterable
protected function find(\$filter = null, array \$parameters = [], \$orderBy=null, array \$additionalTablesFetch = [], ?int \$mode = null) : ResultIterator
{
if (\$this->defaultSort && \$orderBy == null) {
\$orderBy = '$tableName.'.\$this->defaultSort.' '.\$this->defaultDirection;
Expand All @@ -371,7 +371,7 @@ protected function find(\$filter = null, array \$parameters = [], \$orderBy=null
* @param int|null \$mode Either TDBMService::MODE_ARRAY or TDBMService::MODE_CURSOR (for large datasets). Defaults to TDBMService::MODE_ARRAY.
* @return {$beanClassWithoutNameSpace}[]|ResultIterator
*/
protected function findFromSql(string \$from, \$filter = null, array \$parameters = [], \$orderBy = null, ?int \$mode = null) : iterable
protected function findFromSql(string \$from, \$filter = null, array \$parameters = [], \$orderBy = null, ?int \$mode = null) : ResultIterator
{
if (\$this->defaultSort && \$orderBy == null) {
\$orderBy = '$tableName.'.\$this->defaultSort.' '.\$this->defaultDirection;
Expand All @@ -393,7 +393,7 @@ protected function findFromSql(string \$from, \$filter = null, array \$parameter
* @param int|null \$mode Either TDBMService::MODE_ARRAY or TDBMService::MODE_CURSOR (for large datasets). Defaults to TDBMService::MODE_ARRAY.
* @return {$beanClassWithoutNameSpace}[]|ResultIterator
*/
protected function findFromRawSql(string \$sql, array \$parameters = [], ?string \$countSql = null, ?int \$mode = null) : iterable
protected function findFromRawSql(string \$sql, array \$parameters = [], ?string \$countSql = null, ?int \$mode = null) : ResultIterator
{
return \$this->tdbmService->findObjectsFromRawSql('$tableName', \$sql, \$parameters, \$mode, null, \$countSql);
}
Expand Down

0 comments on commit 63a2071

Please sign in to comment.