for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gelf\Transport;
use Gelf\MessageInterface as Message;
/**
* A wrapper for any AbstractTransport to ignore any kind of errors
* @package Gelf\Transport
*/
class IgnoreErrorTransportWrapper extends AbstractTransport
{
* @var AbstractTransport
private $transport;
* @var \Exception|null
private $lastError = null;
* IgnoreErrorTransportWrapper constructor.
*
* @param AbstractTransport $transport
public function __construct(AbstractTransport $transport)
$this->transport = $transport;
}
* Sends a Message over this transport.
* @param Message $message
* @return int the number of bytes sent
public function send(Message $message)
try {
return $this->transport->send($message);
} catch (\Exception $e) {
$this->lastError = $e;
return 0;
* Returns the last error
* @return \Exception
\Exception|null
This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.
@return
public function getLastError()
return $this->lastError;
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.