Code Duplication    Length = 11-13 lines in 3 locations

src/Comodojo/Extender/Base/Process.php 3 locations

@@ 122-134 (lines=13) @@
119
     *
120
     * It kills everything and then exit with status 1
121
     */
122
    public function sigIntHandler($signal) {
123
124
        if ( $this->pid == $this->getPid() ) {
125
126
            $this->logger->info("Received TERM signal, shutting down process gracefully");
127
128
            $this->events->emit( new SignalEvent($signal, $this) );
129
130
            $this->end(0);
131
132
        }
133
134
    }
135
136
    /**
137
     * The sigTerm handler.
@@ 141-153 (lines=13) @@
138
     *
139
     * It kills everything and then exit with status 1
140
     */
141
    public function sigTermHandler($signal) {
142
143
        if ( $this->pid == $this->getPid() ) {
144
145
            $this->logger->info("Received TERM signal, shutting down process");
146
147
            $this->events->emit( new SignalEvent($signal, $this) );
148
149
            $this->end(1);
150
151
        }
152
153
    }
154
155
    /**
156
     * The generig signal handler.
@@ 160-170 (lines=11) @@
157
     *
158
     * It can be used to handle custom signals
159
     */
160
    public function genericSignalHandler($signal) {
161
162
        if ( $this->pid == $this->getPid() ) {
163
164
            $this->logger->info("Received $signal signal, firing associated event(s)");
165
166
            $this->events->emit( new SignalEvent($signal, $this) );
167
168
        }
169
170
    }
171
172
    /**
173
     * @param integer $return_code