update libraries and run php-cs-fixer.

This commit is contained in:
2024-01-30 18:35:21 +09:00
parent b2617cd48c
commit 0e188c0380
8 changed files with 440 additions and 628 deletions

View File

@ -97,32 +97,32 @@ class DigiTemp
$key = array_shift($cols);
$value = array_shift($cols);
switch ($key) {
case 'TTY':
$this->config[$key] = $value;
break;
case 'READ_TIME':
$this->config[$key] = (int) $value;
break;
case 'LOG_TYPE':
$this->config[$key] = (int) $value;
break;
case 'LOG_FORMAT':
$this->config[$key] = '"' === substr($value, 0, 1) ? stripslashes(substr($value, 1, -1)) : $value;
break;
case 'CNT_FORMAT':
$this->config[$key] = '"' === substr($value, 0, 1) ? stripslashes(substr($value, 1, -1)) : $value;
break;
case 'HUM_FORMAT':
$this->config[$key] = '"' === substr($value, 0, 1) ? stripslashes(substr($value, 1, -1)) : $value;
break;
case 'SENSORS':
$this->config[$key] = (int) $value;
break;
case 'ROM':
$this->config[$key][(int) $value] = str_replace('0x', '', implode('', array_reverse($cols)));
break;
default:
return false;
case 'TTY':
$this->config[$key] = $value;
break;
case 'READ_TIME':
$this->config[$key] = (int) $value;
break;
case 'LOG_TYPE':
$this->config[$key] = (int) $value;
break;
case 'LOG_FORMAT':
$this->config[$key] = '"' === substr($value, 0, 1) ? stripslashes(substr($value, 1, -1)) : $value;
break;
case 'CNT_FORMAT':
$this->config[$key] = '"' === substr($value, 0, 1) ? stripslashes(substr($value, 1, -1)) : $value;
break;
case 'HUM_FORMAT':
$this->config[$key] = '"' === substr($value, 0, 1) ? stripslashes(substr($value, 1, -1)) : $value;
break;
case 'SENSORS':
$this->config[$key] = (int) $value;
break;
case 'ROM':
$this->config[$key][(int) $value] = str_replace('0x', '', implode('', array_reverse($cols)));
break;
default:
return false;
}
}

View File

@ -58,8 +58,6 @@ class Address
/**
* check wheter string is email.
*
* @param string $text email
*
* @return bool false if not email string
*/
public function validateEmail(string $email): bool

View File

@ -9,10 +9,9 @@ class UTF8_Mailer
/**
* send mail.
*
* @param Address $form from email address
* @param array $tos to email addresses
* @param string $subject subject
* @param string $body mail body
* @param array $tos to email addresses
* @param string $subject subject
* @param string $body mail body
*
* @return bool false if failure
*/