GetPackageHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 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\Hexagonal\Application\Signatures\Responder\ResponseInterface;
12
use Ticaje\Hexagonal\Application\Signatures\UseCase\HandlerInterface;
13
use Ticaje\Hexagonal\Application\Signatures\UseCase\UseCaseCommandInterface;
14
15
/**
16
 * Class GetPackageHandler
17
 * @package Ticaje\BookingApi\Application\UseCase\Handler
18
 */
19
class GetPackageHandler extends Base implements HandlerInterface
20
{
21
    /**
22
     * @inheritDoc
23
     */
24
    public function handle(UseCaseCommandInterface $command): ResponseInterface
25
    {
26
        $content = $this->serviceProvider->execute($command);
27
        $this->responder
28
            ->setSuccess(true)
29
            ->setMessage('Prices fetched successfully!!')
30
            ->setContent($content);
31
32
        return $this->responder;
33
    }
34
}
35