for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Chain layers for RPC client
* User: moyo
* Date: 12/12/2017
* Time: 11:58 AM
*/
namespace Carno\HRPC\Client\Chips;
use function Carno\Coroutine\async;
use Carno\Coroutine\Context;
use Carno\Promise\Promised;
use Carno\RPC\Protocol\Request;
use Carno\RPC\Protocol\Response;
use Throwable;
trait Layers
{
* @param Request $request
* @param Context $ctx
* @return Promised
public function inbound($request, Context $ctx) : Promised
return async(function (Request $request) {
return $this->call($request);
call()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return $this->/** @scrutinizer ignore-call */ call($request);
}, $ctx, $request);
}
* @param Response $response
* @return Response
public function outbound($response, Context $ctx)
$ctx
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function outbound($response, /** @scrutinizer ignore-unused */ Context $ctx)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $response;
* @param Throwable $e
* @throws Throwable
public function exception(Throwable $e, Context $ctx) : void
public function exception(Throwable $e, /** @scrutinizer ignore-unused */ Context $ctx) : void
throw $e;