src/Job.php
public static function create(array $args)
    {
        $job = new Job($args['body']);

        if (isset($args['id'])) {
            $job->setId($args['id']);
            $job->setTtl(hexdec(substr($job->getId(), -4)));
        }

        if (isset($args['queue'])) {
            $job->setQueue($args['queue']);
        }

        if (isset($args['ttl'])) {
            $job->setTtl($args['ttl']);
        }

        if (isset($args['retry'])) {
            $job->setRetry($args['retry']);
        }

        return $job;
    }
public static function create(array $args)
    {
        $job = new Job($args['body']);

        if (isset($args['id'])) {
            $job->setId($args['id']);
            $job->setTtl(hexdec(substr($job->getId(), -4)));
        }

        if (isset($args['queue'])) {
            $job->setQueue($args['queue']);
        }

        if (isset($args['ttl'])) {
            $job->setTtl($args['ttl']);
        }

        if (isset($args['retry'])) {
            $job->setRetry($args['retry']);
        }

        return $job;
    }
public static function create ( array $ args ) { $ job = new Job ( $ args [ 'body' ] ) ; if ( isset ( $ args [ 'id' ] ) ) { $ job -> setId ( $ args [ 'id' ] ) ; $ job -> setTtl ( hexdec ( substr ( $ job -> getId ( ) , - 4 ) ) ) ; } if ( isset ( $ args [ 'queue' ] ) ) { $ job -> setQueue ( $ args [ 'queue' ] ) ; } if ( isset ( $ args [ 'ttl' ] ) ) { $ job -> setTtl ( $ args [ 'ttl' ] ) ; } if ( isset ( $ args [ 'retry' ] ) ) { $ job -> setRetry ( $ args [ 'retry' ] ) ; } return $ job ; }
Job Factory method.

@param array $args
@return Job
Job Factory method .