protected function verifyJob(Job $job, $jobData)
    {
        if (empty($jobData) || !is_array($jobData)) {
            // Probably not from PHPCI.
            $this->pheanstalk->delete($job);
            return false;
        }

        if (!array_key_exists('type', $jobData) || $jobData['type'] !== 'phpci.build') {
            // Probably not from PHPCI.
            $this->pheanstalk->delete($job);
            return false;
        }

        return true;
    }
protected function verifyJob(Job $job, $jobData)
    {
        if (empty($jobData) || !is_array($jobData)) {
            // Probably not from PHPCI.
            $this->pheanstalk->delete($job);
            return false;
        }

        if (!array_key_exists('type', $jobData) || $jobData['type'] !== 'phpci.build') {
            // Probably not from PHPCI.
            $this->pheanstalk->delete($job);
            return false;
        }

        return true;
    }
protected function verifyJob ( Job $ job , $ jobData ) { if ( empty ( $ jobData ) || ! is_array ( $ jobData ) ) { // Probably not from PHPCI. $ this -> pheanstalk -> delete ( $ job ) ; return false ; } if ( ! array_key_exists ( 'type' , $ jobData ) || $ jobData [ 'type' ] !== 'phpci.build' ) { // Probably not from PHPCI. $ this -> pheanstalk -> delete ( $ job ) ; return false ; } return true ; }
Checks that the job received is actually from PHPCI, and has a valid type.
@param Job $job
@param $jobData
@return bool
Checks that the job received is actually from PHPCI and has a valid type .