Base   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 26
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Application Handler Class
5
 * @package Ticaje_BookingApi
6
 * @author  Hector Luis Barrientos <[email protected]>
7
 */
8
9
namespace Ticaje\BookingApi\Application\UseCase\Handler;
10
11
use Ticaje\BookingApi\Application\Signatures\Provider\ServiceProviderSignature;
12
use Ticaje\Hexagonal\Application\Signatures\Responder\ResponseInterface;
13
use Ticaje\Hexagonal\Application\Signatures\UseCase\HandlerInterface;
14
use Ticaje\Hexagonal\Application\Signatures\UseCase\UseCaseCommandInterface;
15
16
/**
17
 * Class Base
18
 * @package Ticaje\BookingApi\Application\UseCase\Handler
19
 */
20
abstract class Base implements HandlerInterface
21
{
22
    /** @var ResponseInterface  */
23
    protected $responder;
24
25
    /** @var ServiceProviderSignature  */
26
    protected $serviceProvider;
27
28
    /**
29
     * Base constructor.
30
     *
31
     * @param ResponseInterface        $responder
32
     * @param ServiceProviderSignature $serviceProvider
33
     */
34
    public function __construct(
35
        ResponseInterface $responder,
36
        ServiceProviderSignature $serviceProvider
37
    ) {
38
        $this->responder = $responder;
39
        $this->serviceProvider = $serviceProvider;
40
    }
41
42
    /**
43
     * @inheritDoc
44
     */
45
    abstract public function handle(UseCaseCommandInterface $command): ResponseInterface;
46
}
47