| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 22 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 33 | public function running(\Base $f3, array $params = [])  | 
            ||
| 
                                                                                                                                                                                                            
                         3 ignored issues 
                            –
                            show
                         | 
                |||
| 34 |     { | 
            ||
| 35 | $cli = $this->cli;  | 
            ||
| 36 | $cli->shoutBold(__METHOD__);  | 
            ||
| 37 | |||
| 38 | // use process id for log notifications  | 
            ||
| 39 | $mypid = getmypid();  | 
            ||
| 40 | $pid = $mypid['PID'];  | 
            ||
| 41 | $msg = $pid . ': Starting...';  | 
            ||
| 42 | $cli->shout($msg);  | 
            ||
| 43 | |||
| 44 | // check if already running, quit if so  | 
            ||
| 45 |         exec('ps auxww | grep -i index/running | grep -v grep', $ps); | 
            ||
| 46 | |||
| 47 |         if (1 < count($ps)) { | 
            ||
| 48 | $msg = $pid . ': Already running! Quitting.';  | 
            ||
| 49 | $cli->shout($msg);  | 
            ||
| 50 | return false;  | 
            ||
| 51 | }  | 
            ||
| 52 | |||
| 53 | sleep(10);  | 
            ||
| 54 | }  | 
            ||
| 55 | }  | 
            ||
| 56 | 
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.