src/ProcessFinder.php
public function getProcess($pid = null)
    {
        if (is_null($pid)) {
            $pid = $this->pid;
        }

        if (is_null($pid)) {
            throw new ProcessFinderException('Pid is required');
        }

        $process = $this->api->getProcessByPid($pid);

        return count($process) ? $process[0] : false;
    }
public function getProcess($pid = null)
    {
        if (is_null($pid)) {
            $pid = $this->pid;
        }

        if (is_null($pid)) {
            throw new ProcessFinderException('Pid is required');
        }

        $process = $this->api->getProcessByPid($pid);

        return count($process) ? $process[0] : false;
    }
public function getProcess ( $ pid = null ) { if ( is_null ( $ pid ) ) { $ pid = $ this -> pid ; } if ( is_null ( $ pid ) ) { throw new ProcessFinderException ( 'Pid is required' ) ; } $ process = $ this -> api -> getProcessByPid ( $ pid ) ; return count ( $ process ) ? $ process [ 0 ] : false ; }
If the process exists will return the array
else if not found will return false.

@param null $pid

@return \mozartk\ProcessFinder\Process|boolean
@throws \mozartk\ProcessFinder\Exception\ProcessFinderException
If the process exists will return the array else if not found will return false .