diff --git a/app/Models/Aauth/GroupModel.php b/app/Models/Aauth/GroupModel.php index 603eb9f..d570027 100644 --- a/app/Models/Aauth/GroupModel.php +++ b/app/Models/Aauth/GroupModel.php @@ -8,17 +8,19 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; use CodeIgniter\Model; +use CodeIgniter\Database\ConnectionInterface; +use CodeIgniter\Validation\ValidationInterface; use Config\Aauth as AauthConfig; /** @@ -51,8 +53,12 @@ class GroupModel extends Model /** * Constructor + * + * @param ConnectionInterface $db Connection Interface + * @param ValidationInterface $validation Validation Interface + * @param \Config\Aauth $config Config Object */ - public function __construct($db = null, $validation = null, $config = null) + public function __construct(ConnectionInterface &$db = null, ValidationInterface $validation = null, \Config\Aauth $config = null) { if (is_null($config)) { diff --git a/app/Models/Aauth/GroupToGroupModel.php b/app/Models/Aauth/GroupToGroupModel.php index fa43e6f..e4e3526 100644 --- a/app/Models/Aauth/GroupToGroupModel.php +++ b/app/Models/Aauth/GroupToGroupModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; diff --git a/app/Models/Aauth/GroupToUserModel.php b/app/Models/Aauth/GroupToUserModel.php index 304f630..1c94a0e 100644 --- a/app/Models/Aauth/GroupToUserModel.php +++ b/app/Models/Aauth/GroupToUserModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; diff --git a/app/Models/Aauth/GroupVariableModel.php b/app/Models/Aauth/GroupVariableModel.php index 5a6c17d..c540e6d 100644 --- a/app/Models/Aauth/GroupVariableModel.php +++ b/app/Models/Aauth/GroupVariableModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; diff --git a/app/Models/Aauth/LoginAttemptModel.php b/app/Models/Aauth/LoginAttemptModel.php index 44932c8..a581aa2 100644 --- a/app/Models/Aauth/LoginAttemptModel.php +++ b/app/Models/Aauth/LoginAttemptModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; @@ -74,11 +74,11 @@ class LoginAttemptModel /** * Constructor * - * @param ConnectionInterface $db Database connection - * - * @return void + * @param ConnectionInterface $db Database connection + * @param \Config\Aauth $config Config Object + * @param \CodeIgniter\HTTP\Response $response Response Class */ - public function __construct(ConnectionInterface &$db = null, $config = null, $response = null) + public function __construct(ConnectionInterface &$db = null, \Config\Aauth $config = null, \CodeIgniter\HTTP\Response $response = null) { if (is_null($config)) { diff --git a/app/Models/Aauth/LoginTokenModel.php b/app/Models/Aauth/LoginTokenModel.php index 45b4747..de914ec 100644 --- a/app/Models/Aauth/LoginTokenModel.php +++ b/app/Models/Aauth/LoginTokenModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; @@ -128,16 +128,17 @@ class LoginTokenModel /** * Update Login Token by tokenId * - * @param integer $tokenId Login Token id + * @param integer $tokenId Login Token id + * @param string $expiresAt Custom expires at date * * @return boolean */ - public function update(int $tokenId) + public function update(int $tokenId, string $expiresAt = null) { $builder = $this->builder(); $builder->where('id', $tokenId); - $data['expires_at'] = date('Y-m-d H:i:s', strtotime($this->config->loginRemember)); + $data['expires_at'] = date('Y-m-d H:i:s', strtotime($expiresAt ?: $this->config->loginRemember)); $data['updated_at'] = date('Y-m-d H:i:s'); return $builder->set($data)->update(); diff --git a/app/Models/Aauth/PermModel.php b/app/Models/Aauth/PermModel.php index 6887973..6b531aa 100644 --- a/app/Models/Aauth/PermModel.php +++ b/app/Models/Aauth/PermModel.php @@ -8,17 +8,19 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; use CodeIgniter\Model; +use CodeIgniter\Database\ConnectionInterface; +use CodeIgniter\Validation\ValidationInterface; use Config\Aauth as AauthConfig; /** @@ -51,8 +53,12 @@ class PermModel extends Model /** * Constructor + * + * @param ConnectionInterface $db Connection Interface + * @param ValidationInterface $validation Validation Interface + * @param \Config\Aauth $config Config Object */ - public function __construct($db = null, $validation = null, $config = null) + public function __construct(ConnectionInterface &$db = null, ValidationInterface $validation = null, \Config\Aauth $config = null) { if (is_null($config)) { diff --git a/app/Models/Aauth/PermToGroupModel.php b/app/Models/Aauth/PermToGroupModel.php index 3d6700d..1d9050c 100644 --- a/app/Models/Aauth/PermToGroupModel.php +++ b/app/Models/Aauth/PermToGroupModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; diff --git a/app/Models/Aauth/PermToUserModel.php b/app/Models/Aauth/PermToUserModel.php index 54a6dd7..2736d7d 100644 --- a/app/Models/Aauth/PermToUserModel.php +++ b/app/Models/Aauth/PermToUserModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; diff --git a/app/Models/Aauth/UserModel.php b/app/Models/Aauth/UserModel.php index 7202236..84aae06 100644 --- a/app/Models/Aauth/UserModel.php +++ b/app/Models/Aauth/UserModel.php @@ -8,17 +8,19 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; use CodeIgniter\Model; +use CodeIgniter\Database\ConnectionInterface; +use CodeIgniter\Validation\ValidationInterface; use Config\Aauth as AauthConfig; /** @@ -76,8 +78,12 @@ class UserModel extends Model /** * Constructor + * + * @param ConnectionInterface $db Connection Interface + * @param ValidationInterface $validation Validation Interface + * @param \Config\Aauth $config Config Object */ - public function __construct($db = null, $validation = null, $config = null) + public function __construct(ConnectionInterface &$db = null, ValidationInterface $validation = null, \Config\Aauth $config = null) { if (is_null($config)) { @@ -125,6 +131,11 @@ class UserModel extends Model /** * Update + * + * @param integer|array|string $id User Id + * @param array|object $data Data Array + * + * @return boolean */ public function update($id = null, $data = null) { diff --git a/app/Models/Aauth/UserSessionModel.php b/app/Models/Aauth/UserSessionModel.php index dbdb698..f0fa443 100644 --- a/app/Models/Aauth/UserSessionModel.php +++ b/app/Models/Aauth/UserSessionModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth; diff --git a/app/Models/Aauth/UserVariableModel.php b/app/Models/Aauth/UserVariableModel.php index 4aedcc4..1edf4c5 100644 --- a/app/Models/Aauth/UserVariableModel.php +++ b/app/Models/Aauth/UserVariableModel.php @@ -8,12 +8,12 @@ * access management, public access etc.. * * @package CodeIgniter-Aauth - * @since 3.0.0 * @author Emre Akay * @author Raphael "REJack" Jackstadt * @copyright 2014-2019 Emre Akay * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/emreakay/CodeIgniter-Aauth + * @since 3.0.0 */ namespace App\Models\Aauth;