Skip to content

Commit

Permalink
comments + types
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 24, 2024
1 parent ee6dac5 commit 57a6876
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/Mvc/Controller/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected function getOrder()
protected function getLimit(): ?int
{
$limit = (int)$this->getParam('limit', 'int', 1000);
return $limit === -1? null : abs($limit);
return $limit === -1? null : (int)abs($limit);
}

/**
Expand Down Expand Up @@ -394,17 +394,15 @@ public function getBindTypes()
}

/**
* Get Created By Condition
* Get the identity condition for querying the database: Default created by
*
* @param string[] $columns
* @param Identity|null $identity
* @param string[]|null $roleList
* @param array|null $columns The columns to check for identity condition
* @param Identity|null $identity The identity object
* @param array|null $roleList The list of roles
*
* @return null
*
* @return string|null
* @return string|null The generated identity condition or null if no condition is generated
*/
protected function getIdentityCondition(array $columns = null, Identity $identity = null, $roleList = null)
protected function getIdentityCondition(?array $columns = null, ?Identity $identity = null, ?array $roleList = null): ?string
{
$identity ??= $this->identity ?? false;
$roleList ??= $this->getRoleList();
Expand Down

0 comments on commit 57a6876

Please sign in to comment.