for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ScayTrase\Api\JsonRpc;
final class JsonRpcNotification implements JsonRpcRequestInterface
{
/** @var string */
private $method;
/** @var \stdClass|array|null */
private $parameters;
/**
* JsonRpcNotificationRequest constructor.
* @param string $method
* @param \stdClass|array|null $parameters
*/
public function __construct($method, $parameters)
$this->method = $method;
$this->parameters = $parameters;
}
/** {@inheritdoc} */
public function getId()
return null;
public function isNotification()
return true;
public function getMethod()
return $this->method;
public function getParameters()
return $this->parameters;
public function getVersion()
return JsonRpcClient::VERSION;
public function jsonSerialize()
return [
self::VERSION_FIELD => JsonRpcClient::VERSION,
self::METHOD_FIELD => $this->getMethod(),
self::PARAMETERS_FIELD => $this->getParameters(),
];