Completed
Push — 0.3 ( ef6084...d1608f )
by jean
10s
created

AbstractConfigurableStep   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 33
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A describe() 0 3 1
A count() 0 3 1
A configureOptionResolver() 0 6 1
A getProgress() 0 3 1
A finalize() 0 3 1
A isDeprecated() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: darkilliant
5
 * Date: 5/8/18
6
 * Time: 9:48 AM.
7
 */
8
9
namespace Darkilliant\ProcessBundle\Step;
10
11
use Symfony\Component\OptionsResolver\OptionsResolver;
12
use Darkilliant\ProcessBundle\State\ProcessState;
13
14
abstract class AbstractConfigurableStep implements StepInterface
15
{
16 22
    public function configureOptionResolver(OptionsResolver $resolver): OptionsResolver
17
    {
18 22
        $resolver->setRequired('progress_bar');
19 22
        $resolver->setDefault('progress_bar', false);
20
21 22
        return $resolver;
22
    }
23
24 2
    public function finalize(ProcessState $state)
25
    {
26 2
        return;
27
    }
28
29 1
    public function describe(ProcessState $state)
30
    {
31 1
        $state->info(sprintf('run step %s', get_class($this)));
32 1
    }
33
34 1
    public function count(ProcessState $state)
35
    {
36 1
        return;
37
    }
38
39 1
    public function getProgress(ProcessState $state)
40
    {
41 1
        return 0;
42
    }
43
44 1
    public static function isDeprecated(): bool
45
    {
46 1
        return false;
47
    }
48
}
49