Completed
Push — master ( afaf42...8ac772 )
by Raffael
20:10 queued 16:21
created

Key::getOptions()   A

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 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * balloon
7
 *
8
 * @copyright   Copryright (c) 2012-2018 gyselroth GmbH (https://gyselroth.com)
9
 * @license     GPL-3.0 https://opensource.org/licenses/GPL-3.0
10
 */
11
12
namespace Balloon\App\Cli\Console;
13
14
use GetOpt\GetOpt;
15
use ParagonIE\Halite\KeyFactory;
16
17
class Key
18
{
19
    /**
20
     * Getopt.
21
     *
22
     * @var GetOpt
23
     */
24
    protected $getopt;
25
26
    /**
27
     * Constructor.
28
     */
29
    public function __construct(GetOpt $getopt)
30
    {
31
        $this->getopt = $getopt;
32
    }
33
34
    /**
35
     * Start.
36
     */
37
    public function __invoke(): bool
38
    {
39
        $key = KeyFactory::export(KeyFactory::generateEncryptionKey());
40
        echo $key->getString()."\n";
41
42
        return true;
43
    }
44
45
    // Get operands
46
    public static function getOperands(): array
47
    {
48
        return [];
49
    }
50
51
    /**
52
     * Get options.
53
     */
54
    public static function getOptions(): array
55
    {
56
        return [];
57
    }
58
}
59