ComponentHelper::handleWebhook()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the zibios/sharep.
7
 *
8
 * (c) Zbigniew Ślązak
9
 */
10
11
namespace App\Slack\InteractiveComponent;
12
13
use App\Slack\MessageBuilder\Layout;
14
use App\Slack\PredefinedMessage\SharepHelpMessage;
15
use JMS\Serializer\SerializerInterface;
16
17
class ComponentHelper
18
{
19
    /** @var SerializerInterface */
20
    private $serializer;
21
    /** @var SharepHelpMessage */
22
    private $sharepHelpMessage;
23
24
    public function __construct(SerializerInterface $serializer, SharepHelpMessage $sharepHelpMessage)
25
    {
26
        $this->serializer = $serializer;
27
        $this->sharepHelpMessage = $sharepHelpMessage;
28
    }
29
30
    public function handleWebhook(array $data): Layout
0 ignored issues
show
Unused Code introduced by
The parameter $data is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        return $this->sharepHelpMessage->generate();
33
    }
34
}
35