Completed
Push — master ( 188ba1...86d637 )
by Samuel
02:55
created

BaseHandler

Complexity

Total Complexity 0

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16

2 Methods

Rating   Name   Duplication   Size   Complexity  
validate() 0 1 ?
__invoke() 0 1 ?
1
<?php
2
3
namespace Kelemen\ApiNette\Handler;
4
5
use Nette\Application\IResponse;
6
use Nette\Http\Request;
7
use Nette\Http\Response;
8
9
abstract class BaseHandler
10
{
11
    /**
12
     * Validate input
13
     * @return bool
14
     */
15
    abstract public function validate();
16
17
    /**
18
     * @param Request $request
19
     * @param Response $response
20
     * @param callable $next
21
     * @return IResponse
22
     */
23
    abstract public function __invoke(Request $request, Response $response, callable $next);
24
}
25