Completed
Push — master ( 5b4c10...526034 )
by Benjamin
04:25
created

InstallGeneratePackagestatesTask::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 7

Duplication

Lines 14
Ratio 100 %

Importance

Changes 0
Metric Value
dl 14
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the teamneusta/magallanes-task-typo3 package.
4
 *
5
 * Copyright (c) 2017 neusta GmbH | Ein team neusta Unternehmen
6
 *
7
 * For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
8
 *
9
 * @license http://www.opensource.org/licenses/mit-license.html  MIT License
10
 */
11
declare(strict_types=1);
12
13
namespace TeamNeusta\Magallanes\Task\TYPO3\Console;
14
15
/**
16
 * Class GeneratepackagestatesTask
17
 *
18
 * @author Benjamin Kluge <[email protected]>
19
 * @package TeamNeusta\Magallanes\Task\TYPO3\Console
20
 */
21 View Code Duplication
class InstallGeneratePackagestatesTask extends AbstractConsoleTask
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
{
23
    /**
24
     * name
25
     *
26
     * @var string
27
     */
28
    protected $name = 'console-install-generate-packagestates';
29
30
    /**
31
     * description
32
     *
33
     * @var string
34
     */
35
    protected $description = '[TYPO3] TYPO3 console install generate packagestates task';
36
37
    /**
38
     * execute
39
     *
40
     * @return bool
41
     */
42
    public function execute(): bool
43
    {
44
        $options = $this->getOptions(
45
            [
46
                'flags' => '--activate-default=true'
47
            ]
48
        );
49
        $command = sprintf(
50
            $this->getConsoleCommand('install:generatepackagestates', $options) . '%s',
51
            $options['flags']
52
        );
53
54
        return $this->executeCommand($command);
55
    }
56
}
57