mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-12 04:21:30 +01:00
FIX: Update swiftmailer librairies
This commit is contained in:
@@ -30,7 +30,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
private $in = 0;
|
||||
|
||||
/** Bound byte streams */
|
||||
private $mirrors = array();
|
||||
private $mirrors = [];
|
||||
|
||||
/**
|
||||
* Not used.
|
||||
@@ -41,8 +41,6 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
|
||||
/**
|
||||
* Invoked immediately after the Message is sent.
|
||||
*
|
||||
* @param Swift_Events_SendEvent $evt
|
||||
*/
|
||||
public function sendPerformed(Swift_Events_SendEvent $evt)
|
||||
{
|
||||
@@ -52,24 +50,20 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
|
||||
/**
|
||||
* Invoked immediately following a command being sent.
|
||||
*
|
||||
* @param Swift_Events_CommandEvent $evt
|
||||
*/
|
||||
public function commandSent(Swift_Events_CommandEvent $evt)
|
||||
{
|
||||
$command = $evt->getCommand();
|
||||
$this->out += strlen($command);
|
||||
$this->out += \strlen($command);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked immediately following a response coming back.
|
||||
*
|
||||
* @param Swift_Events_ResponseEvent $evt
|
||||
*/
|
||||
public function responseReceived(Swift_Events_ResponseEvent $evt)
|
||||
{
|
||||
$response = $evt->getResponse();
|
||||
$this->in += strlen($response);
|
||||
$this->in += \strlen($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +73,7 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*/
|
||||
public function write($bytes)
|
||||
{
|
||||
$this->out += strlen($bytes);
|
||||
$this->out += \strlen($bytes);
|
||||
foreach ($this->mirrors as $stream) {
|
||||
$stream->write($bytes);
|
||||
}
|
||||
@@ -97,8 +91,6 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
*
|
||||
* The stream acts as an observer, receiving all data that is written.
|
||||
* All {@link write()} and {@link flushBuffers()} operations will be mirrored.
|
||||
*
|
||||
* @param Swift_InputByteStream $is
|
||||
*/
|
||||
public function bind(Swift_InputByteStream $is)
|
||||
{
|
||||
@@ -111,8 +103,6 @@ class Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener,
|
||||
* If $is is not bound, no errors will be raised.
|
||||
* If the stream currently has any buffered data it will be written to $is
|
||||
* before unbinding occurs.
|
||||
*
|
||||
* @param Swift_InputByteStream $is
|
||||
*/
|
||||
public function unbind(Swift_InputByteStream $is)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user