Test Failed
Push — master ( f37c42...2f32dc )
by Zbigniew
04:32
created

SharepHelpMessage::generate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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\SlashCommand\Sharep;
12
13
use App\Slack\MessageBuilder\Layout;
14
use App\Slack\MessageBuilder\MessageFactory;
15
16
class SharepHelpMessage
17
{
18
    /** @var MessageFactory */
19
    private $messageFactory;
20
21 3
    public function __construct(MessageFactory $messageFactory)
22
    {
23 3
        $this->messageFactory = $messageFactory;
24 3
    }
25
26 1
    public function generate(): Layout
27
    {
28 1
        $mf = $this->messageFactory;
29
30 1
        return $mf->layout(
31 1
            $mf->blockSection(
32 1
                $mf->elementPlainText('Please try again, proper commands are:')
33
            ),
34 1
            $mf->blockSection(
35 1
                $mf->elementPlainText('/sharep release')
36
            )
37
        );
38
    }
39
}
40