Code Duplication    Length = 11-12 lines in 3 locations

src/CommandBuilder/SystemdCommandBuilder.php 2 locations

@@ 56-66 (lines=11) @@
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function stop($service)
57
    {
58
        if (empty($service)) {
59
            throw new \InvalidArgumentException('No service selected to be started');
60
        }
61
62
        $this->service = $service;
63
        $this->action = 'stop';
64
65
        return $this;
66
    }
67
68
    /**
69
     * {@inheritdoc}
@@ 101-111 (lines=11) @@
98
    /**
99
     * {@inheritdoc}
100
     */
101
    public function disable($service)
102
    {
103
        if (empty($service)) {
104
            throw new \InvalidArgumentException('No service selected to be disabled');
105
        }
106
107
        $this->service = $service;
108
        $this->action = 'disable';
109
110
        return $this;
111
    }
112
113
    /**
114
     * {@inheritdoc}

src/CommandBuilder/SysVinitCommandBuilder.php 1 location

@@ 71-82 (lines=12) @@
68
    /**
69
     * {@inheritdoc}
70
     */
71
    public function stop($service)
72
    {
73
        if (empty($service)) {
74
            throw new \InvalidArgumentException('No service selected to be started');
75
        }
76
77
        $this->cmd = '/etc/init.d';
78
        $this->service = $service;
79
        $this->action = 'stop';
80
81
        return $this;
82
    }
83
84
    /**
85
     * {@inheritdoc}