mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
rename all instances of 'datas' to 'data'
This commit is contained in:
parent
730ac8963b
commit
61d644c247
48 changed files with 316 additions and 316 deletions
|
@ -58,17 +58,17 @@ namespace controllers\internals;
|
|||
* @param int $id_user : User to insert phone for
|
||||
* @param string $name : The name of the phone
|
||||
* @param string $adapter : The adapter to use the phone
|
||||
* @param string json $adapter_datas : A JSON string representing adapter's datas (for example credentials for an api)
|
||||
* @param string json $adapter_data : A JSON string representing adapter's data (for example credentials for an api)
|
||||
*
|
||||
* @return bool|int : false on error, new id on success
|
||||
*/
|
||||
public function create(int $id_user, string $name, string $adapter, string $adapter_datas)
|
||||
public function create(int $id_user, string $name, string $adapter, string $adapter_data)
|
||||
{
|
||||
$phone = [
|
||||
'id_user' => $id_user,
|
||||
'name' => $name,
|
||||
'adapter' => $adapter,
|
||||
'adapter_datas' => $adapter_datas,
|
||||
'adapter_data' => $adapter_data,
|
||||
];
|
||||
|
||||
return $this->get_model()->insert($phone);
|
||||
|
@ -81,17 +81,17 @@ namespace controllers\internals;
|
|||
* @param int $id : Phone id
|
||||
* @param string $name : The name of the phone
|
||||
* @param string $adapter : The adapter to use the phone
|
||||
* @param array $adapter_datas : An array of the datas of the adapter (for example credentials for an api)
|
||||
* @param array $adapter_data : An array of the data of the adapter (for example credentials for an api)
|
||||
*
|
||||
* @return bool : false on error, true on success
|
||||
*/
|
||||
public function update_for_user(int $id_user, int $id, string $name, string $adapter, array $adapter_datas): bool
|
||||
public function update_for_user(int $id_user, int $id, string $name, string $adapter, array $adapter_data): bool
|
||||
{
|
||||
$phone = [
|
||||
'id_user' => $id_user,
|
||||
'name' => $name,
|
||||
'adapter' => $adapter,
|
||||
'adapter_datas' => json_encode($adapter_datas),
|
||||
'adapter_data' => json_encode($adapter_data),
|
||||
];
|
||||
|
||||
return (bool) $this->get_model()->update_for_user($id_user, $id, $phone);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue