Code Duplication    Length = 6-9 lines in 3 locations

src/Alias/Task/Factory/AliasManagementTaskFactory.php 2 locations

@@ 34-42 (lines=9) @@
31
        if($input->getArgument('action') === 'list'){
32
            return new Listing($services);
33
        }
34
        if($input->getArgument('action') === 'save'){
35
            if(!$input->getArgument('name')){
36
                throw new \InvalidArgumentException('name param is mandatory for this action');
37
            }
38
            if(!$input->getArgument('bootstrap')){
39
                throw new \InvalidArgumentException('bootstrap param is mandatory for this action');
40
            }
41
            return new Saving($services);
42
        }
43
        if($input->getArgument('action') === 'rm' || $input->getArgument('action') === 'remove'){
44
            if(!$input->getArgument('name')){
45
                throw new \InvalidArgumentException('name param is mandatory for this action');
@@ 43-48 (lines=6) @@
40
            }
41
            return new Saving($services);
42
        }
43
        if($input->getArgument('action') === 'rm' || $input->getArgument('action') === 'remove'){
44
            if(!$input->getArgument('name')){
45
                throw new \InvalidArgumentException('name param is mandatory for this action');
46
            }
47
            return new Removing($services);
48
        }
49
50
        $textFinder = new Finder($input->getArgument('action'), AliasCommand::$actions);
51
        throw new \InvalidArgumentException(sprintf(

src/Module/Task/Factory/ModuleManagementTaskFactory.php 1 location

@@ 45-50 (lines=6) @@
42
        if($input->getArgument('action') === 'update'){
43
            return new Updating($services);
44
        }
45
        if($input->getArgument('action') === 'rm' || $input->getArgument('action') === 'remove'){
46
            if(!$input->getArgument('name')){
47
                throw new \InvalidArgumentException('name param is mandatory for this action');
48
            }
49
            return new Removing($services);
50
        }
51
        if($input->getArgument('action') === 'enable'){
52
            if(!$input->getArgument('name')){
53
                throw new \InvalidArgumentException('name param is mandatory for this action');