SlackNotificationPrompt::getValues()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 6
nc 2
nop 2
crap 2
1
<?php
2
3
namespace CL\ComposerInit\Prompt;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
use Symfony\Component\Console\Helper\DialogHelper;
7
8
/**
9
 * @author    Ivan Kerin <[email protected]>
10
 * @copyright (c) 2014 Clippings Ltd.
11
 * @license   http://spdx.org/licenses/BSD-3-Clause
12
 */
13
class SlackNotificationPrompt implements PromptInterface
14
{
15 1
    public function getValues(OutputInterface $output, DialogHelper $dialog)
16
    {
17 1
        $value = $dialog->ask(
18 1
            $output,
19
            "<info>Encrypted Slack Notification code</info>: "
20 1
        );
21
22
        return [
23 1
            'slack_notification' => $value ? "  slack:\n    secure: $value\n" : null
24 1
        ];
25
    }
26
}
27
28