mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-06-06 14:46:27 +02:00
fix php cs fixer concat operator to use space
This commit is contained in:
parent
9de6697752
commit
08bf5a878a
26 changed files with 113 additions and 109 deletions
|
@ -198,7 +198,7 @@ namespace adapters;
|
|||
}
|
||||
|
||||
$command_parts = [
|
||||
PWD.'/bin/gammu_get_unread_sms.py',
|
||||
PWD . '/bin/gammu_get_unread_sms.py',
|
||||
escapeshellarg($this->datas['config_file']),
|
||||
];
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace adapters;
|
|||
{
|
||||
$success = true;
|
||||
|
||||
$endpoint = '/sms/'.$this->datas['service_name'].'/virtualNumbers/'.$this->formatted_number.'/jobs';
|
||||
$endpoint = '/sms/' . $this->datas['service_name'] . '/virtualNumbers/' . $this->formatted_number . '/jobs';
|
||||
$params = [
|
||||
'message' => $text,
|
||||
'receivers' => [$destination],
|
||||
|
@ -203,7 +203,7 @@ namespace adapters;
|
|||
{
|
||||
$success = true;
|
||||
|
||||
$endpoint = '/sms/'.$this->datas['service_name'].'/virtualNumbers/'.$this->formatted_number.'/incoming';
|
||||
$endpoint = '/sms/' . $this->datas['service_name'] . '/virtualNumbers/' . $this->formatted_number . '/incoming';
|
||||
$uids = $this->api->get($endpoint);
|
||||
|
||||
if (!\is_array($uids) || !$uids)
|
||||
|
@ -214,7 +214,7 @@ namespace adapters;
|
|||
$received_smss = [];
|
||||
foreach ($uids as $uid)
|
||||
{
|
||||
$endpoint = '/sms/'.$this->datas['service_name'].'/virtualNumbers/'.$this->formatted_number.'/incoming/'.$uid;
|
||||
$endpoint = '/sms/' . $this->datas['service_name'] . '/virtualNumbers/' . $this->formatted_number . '/incoming/' . $uid;
|
||||
$sms_details = $this->api->get($endpoint);
|
||||
|
||||
if (!isset($sms_details['creationDatetime'], $sms_details['message'], $sms_details['sender']))
|
||||
|
@ -230,7 +230,7 @@ namespace adapters;
|
|||
];
|
||||
|
||||
//Remove the sms to prevent double reading as ovh do not offer a filter for unread messages only
|
||||
$endpoint = '/sms/'.$this->datas['service_name'].'/virtualNumbers/'.$this->formatted_number.'/incoming/'.$uid;
|
||||
$endpoint = '/sms/' . $this->datas['service_name'] . '/virtualNumbers/' . $this->formatted_number . '/incoming/' . $uid;
|
||||
$this->api->delete($endpoint);
|
||||
}
|
||||
|
||||
|
@ -255,12 +255,12 @@ namespace adapters;
|
|||
$success = true;
|
||||
|
||||
//Check service name
|
||||
$endpoint = '/sms/'.$this->datas['service_name'];
|
||||
$endpoint = '/sms/' . $this->datas['service_name'];
|
||||
$response = $this->api->get($endpoint);
|
||||
$success = $success && (bool) $response;
|
||||
|
||||
//Check virtualnumber
|
||||
$endpoint = '/sms/virtualNumbers/'.$this->formatted_number;
|
||||
$endpoint = '/sms/virtualNumbers/' . $this->formatted_number;
|
||||
$response = $this->api->get($endpoint);
|
||||
|
||||
return $success && (bool) $response;
|
||||
|
|
|
@ -33,12 +33,12 @@ namespace adapters;
|
|||
/**
|
||||
* Path for the file to read sms as a json from.
|
||||
*/
|
||||
private $test_file_read = PWD_DATAS.'/test_read_sms.json';
|
||||
private $test_file_read = PWD_DATAS . '/test_read_sms.json';
|
||||
|
||||
/**
|
||||
* Path for the file to write sms as a json in.
|
||||
*/
|
||||
private $test_file_write = PWD_DATAS.'/test_write_sms.json';
|
||||
private $test_file_write = PWD_DATAS . '/test_write_sms.json';
|
||||
|
||||
/**
|
||||
* Adapter constructor, called when instanciated by RaspiSMS.
|
||||
|
@ -126,7 +126,7 @@ namespace adapters;
|
|||
$uid = uniqid();
|
||||
|
||||
$at = (new \DateTime())->format('Y-m-d H:i:s');
|
||||
file_put_contents($this->test_file_write, json_encode(['uid' => $uid, 'at' => $at, 'destination' => $destination, 'text' => $text, 'flash' => $flash])."\n", FILE_APPEND);
|
||||
file_put_contents($this->test_file_write, json_encode(['uid' => $uid, 'at' => $at, 'destination' => $destination, 'text' => $text, 'flash' => $flash]) . "\n", FILE_APPEND);
|
||||
|
||||
return uniqid();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue