for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Puzzle\AMQP\Messages;
use Puzzle\AMQP\ReadableMessage;
use Puzzle\AMQP\WritableMessage;
use Puzzle\AMQP\Collections\MessageHookCollection;
class InMemoryJson extends Json implements ReadableMessage, WritableMessage
{
public function getRawBody()
return $this->getFormattedBody();
}
public function getDecodedBody()
return $this->body;
public function getAttributes()
return $this->packAttributes();
public function isLastRetry($retryOccurence = \Puzzle\AMQP\Consumers\Retry::DEFAULT_RETRY_OCCURENCE)
$retryHeader = $this->getHeader(\Puzzle\AMQP\Consumers\Retry::DEFAULT_RETRY_HEADER);
getHeader()
Puzzle\AMQP\Messages\InMemoryJson
getHeaders()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
return (!empty($retryHeader) && (int) $retryHeader === $retryOccurence);
public function applyHooks(MessageHookCollection $messageHookCollection)
$body = $this->body;
foreach($messageHookCollection as $hook)
$body = $hook->process($body);
$this->body = $body;
public function getRoutingKeyFromHeader()
$headers = $this->getHeaders();
if(! array_key_exists('routing_key', $headers))
return null;
return $headers['routing_key'];
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.