mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Fix all phpstan and php-cs-fixer errors
This commit is contained in:
parent
117c18ddca
commit
485a0cb6fd
39 changed files with 994 additions and 1142 deletions
|
@ -4,6 +4,7 @@
|
|||
class User extends \descartes\InternalController
|
||||
{
|
||||
private $model_user;
|
||||
private $internal_event;
|
||||
|
||||
public function __construct(\PDO $bdd)
|
||||
{
|
||||
|
@ -56,9 +57,9 @@
|
|||
* Update a user password
|
||||
* @param string $id : User id
|
||||
* @param string $password : New password
|
||||
* @return boolean;
|
||||
* @return bool;
|
||||
*/
|
||||
public function update_password(int $id, string $password) : boolean
|
||||
public function update_password(int $id, string $password) : bool
|
||||
{
|
||||
$password = password_hash($password, PASSWORD_DEFAULT);
|
||||
return (bool) $this->model_user->update_password($id, $password);
|
||||
|
@ -70,7 +71,7 @@
|
|||
* @param string $transfer : New value of property transfer
|
||||
* @return boolean;
|
||||
*/
|
||||
public function update_transfer(int $id, int $transfer) : boolean
|
||||
public function update_transfer(int $id, int $transfer) : bool
|
||||
{
|
||||
return (bool) $this->model_user->update_transfer($id, $transfer);
|
||||
}
|
||||
|
@ -93,7 +94,7 @@
|
|||
*/
|
||||
public function get_by_email($email)
|
||||
{
|
||||
return $model_user->get_by_email($email);
|
||||
return $this->model_user->get_by_email($email);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +110,7 @@
|
|||
'transfer' => $transfer,
|
||||
];
|
||||
|
||||
return $model_user->update($id, $user);
|
||||
return $this->model_user->update($id, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,13 +127,13 @@
|
|||
'transfer' => $transfer,
|
||||
];
|
||||
|
||||
$result = $model_user->insert($user);
|
||||
$result = $this->model_user->insert($user);
|
||||
|
||||
if (!$result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$internal_event->create('CONTACT_ADD', 'Ajout de l\'utilisateur : ' . $email . '.');
|
||||
$this->internal_event->create('CONTACT_ADD', 'Ajout de l\'utilisateur : ' . $email . '.');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue