ComponentHelper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 18
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A handleWebhook() 0 4 1
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