| Total Complexity | 2 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Caller |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Class name. |
||
| 15 | * |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $class; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Method name. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $method; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Method param array. |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | private $vars; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Caller middleware construct. |
||
| 36 | */ |
||
| 37 | 4 | public function __construct(string $class, string $method, array $vars) |
|
| 38 | { |
||
| 39 | 4 | $this->class = $class; |
|
| 40 | 4 | $this->method = $method; |
|
| 41 | 4 | $this->vars = $vars; |
|
| 42 | 4 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Invoke middleware. |
||
| 46 | * |
||
| 47 | * @param \Psr\Http\Message\RequestInterface $request |
||
| 48 | * @param \Psr\Http\Message\ResponseInterface $response |
||
| 49 | * @param callable $next |
||
| 50 | * |
||
| 51 | * @return \Psr\Http\Message\ResponseInterface |
||
| 52 | */ |
||
| 53 | 4 | public function __invoke(Request $request, Response $response, callable $next) : \Psr\Http\Message\ResponseInterface |
|
| 63 | } |
||
| 64 | } |
||
| 65 |