mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
use correct model and fix style
This commit is contained in:
parent
e21b89cc7c
commit
e957c9feb7
29 changed files with 105 additions and 111 deletions
|
@ -64,24 +64,25 @@ namespace controllers\internals;
|
|||
return $this->get_model()->get_by_number_for_user($id_user, $number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a string to check if its a SMS stop.
|
||||
*
|
||||
* @param string $str : The string to check
|
||||
*
|
||||
* @return bool : true if sms stop, false else
|
||||
*/
|
||||
public function check_for_stop(string $str)
|
||||
{
|
||||
return 'stop' == trim(mb_strtolower($str));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the model for the Controller.
|
||||
*/
|
||||
protected function get_model(): \descartes\Model
|
||||
protected function get_model(): \models\SmsStop
|
||||
{
|
||||
$this->model = $this->model ?? new \models\SmsStop($this->bdd);
|
||||
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a string to check if its a SMS stop
|
||||
*
|
||||
* @param string $str : The string to check
|
||||
* @return bool : true if sms stop, false else
|
||||
*/
|
||||
public function check_for_stop (string $str)
|
||||
{
|
||||
return trim(mb_strtolower($str)) == 'stop';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue