Annotation fixes courtesy of phan
This commit is contained in:
parent
bbacda8ccc
commit
9d4008b2a0
|
|
@ -351,7 +351,7 @@ class PHPMailer
|
|||
* <code>
|
||||
* $mail->Debugoutput = new myPsr3Logger;
|
||||
* </code>
|
||||
* @var string|callable|Psr\Log\LoggerInterface
|
||||
* @var string|callable|\Psr\Log\LoggerInterface
|
||||
* @see SMTP::$Debugoutput
|
||||
*/
|
||||
public $Debugoutput = 'echo';
|
||||
|
|
@ -723,7 +723,7 @@ class PHPMailer
|
|||
* @param string $subject Subject
|
||||
* @param string $body Message Body
|
||||
* @param string $header Additional Header(s)
|
||||
* @param string $params Params
|
||||
* @param ?string $params Params
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
|
|
@ -2298,7 +2298,7 @@ class PHPMailer
|
|||
} elseif (function_exists("openssl_random_pseudo_bytes")) {
|
||||
$bytes = openssl_random_pseudo_bytes($len);
|
||||
} else {
|
||||
$bytes = uniqid(mt_rand(), true);
|
||||
$bytes = uniqid((string)mt_rand(), true);
|
||||
}
|
||||
return hash('sha256', $bytes);
|
||||
}
|
||||
|
|
@ -2486,7 +2486,7 @@ class PHPMailer
|
|||
$signed,
|
||||
'file://' . realpath($this->sign_cert_file),
|
||||
['file://' . realpath($this->sign_key_file), $this->sign_key_pass],
|
||||
null
|
||||
[]
|
||||
);
|
||||
} else {
|
||||
$sign = @openssl_pkcs7_sign(
|
||||
|
|
@ -2494,7 +2494,7 @@ class PHPMailer
|
|||
$signed,
|
||||
'file://' . realpath($this->sign_cert_file),
|
||||
['file://' . realpath($this->sign_key_file), $this->sign_key_pass],
|
||||
null,
|
||||
[],
|
||||
PKCS7_DETACHED,
|
||||
$this->sign_extracerts_file
|
||||
);
|
||||
|
|
@ -2594,7 +2594,7 @@ class PHPMailer
|
|||
* Format a header line.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param string|integer $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
23
src/POP3.php
23
src/POP3.php
|
|
@ -242,11 +242,7 @@ class POP3
|
|||
if (false === $this->pop_conn) {
|
||||
// It would appear not...
|
||||
$this->setError(
|
||||
[
|
||||
'error' => "Failed to connect to server $host on port $port",
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr
|
||||
]
|
||||
"Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -361,13 +357,7 @@ class POP3
|
|||
protected function checkResponse($string)
|
||||
{
|
||||
if (substr($string, 0, 3) !== '+OK') {
|
||||
$this->setError(
|
||||
[
|
||||
'error' => "Server reported an error: $string",
|
||||
'errno' => 0,
|
||||
'errstr' => ''
|
||||
]
|
||||
);
|
||||
$this->setError("Server reported an error: $string");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
@ -413,13 +403,8 @@ class POP3
|
|||
protected function catchWarning($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
$this->setError(
|
||||
[
|
||||
'error' => 'Connecting to the POP3 server raised a PHP warning: ',
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr,
|
||||
'errfile' => $errfile,
|
||||
'errline' => $errline
|
||||
]
|
||||
'Connecting to the POP3 server raised a PHP warning:'.
|
||||
"errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
src/SMTP.php
17
src/SMTP.php
|
|
@ -112,7 +112,7 @@ class SMTP
|
|||
* $mail->Debugoutput = new myPsr3Logger;
|
||||
* </code>
|
||||
*
|
||||
* @var string|callable|Psr\Log\LoggerInterface
|
||||
* @var string|callable|\Psr\Log\LoggerInterface
|
||||
*/
|
||||
public $Debugoutput = 'echo';
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ class SMTP
|
|||
];
|
||||
|
||||
/**
|
||||
* @var string The last transaction ID issued in response to a DATA command,
|
||||
* @var string|boolean|null The last transaction ID issued in response to a DATA command,
|
||||
* if one was detected
|
||||
*/
|
||||
protected $last_smtp_transaction_id;
|
||||
|
|
@ -164,7 +164,7 @@ class SMTP
|
|||
/**
|
||||
* The socket for the server connection.
|
||||
*
|
||||
* @var resource
|
||||
* @var ?resource
|
||||
*/
|
||||
protected $smtp_conn;
|
||||
|
||||
|
|
@ -332,8 +332,9 @@ class SMTP
|
|||
if (!is_resource($this->smtp_conn)) {
|
||||
$this->setError(
|
||||
'Failed to connect to server',
|
||||
$errno,
|
||||
$errstr
|
||||
'',
|
||||
(string)$errno,
|
||||
(string)$errstr
|
||||
);
|
||||
$this->edebug(
|
||||
'SMTP ERROR: ' . $this->error['error']
|
||||
|
|
@ -1228,11 +1229,11 @@ class SMTP
|
|||
$notice = 'Connection failed.';
|
||||
$this->setError(
|
||||
$notice,
|
||||
$errno,
|
||||
$errmsg
|
||||
$errmsg,
|
||||
(string)$errno
|
||||
);
|
||||
$this->edebug(
|
||||
$notice . ' Error #' . $errno . ': ' . $errmsg . " [$errfile line $errline]",
|
||||
"$notice Error #$errno: $errmsg [$errfile line $errline]",
|
||||
self::DEBUG_CONNECTION
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue