Skip to content

Commit ef859b6

Browse files
author
Chaitanya Kuber
committed
updated method comments
1 parent 8f06294 commit ef859b6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/Resque/Job.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function __construct($queue, $payload)
5252
* @param string $class The name of the class that contains the code to execute the job.
5353
* @param array $args Any optional arguments that should be passed when the job is executed.
5454
* @param boolean $monitor Set to true to be able to monitor the status of a job.
55+
*
56+
* @return string
5557
*/
5658
public static function create($queue, $class, $args = null, $monitor = false)
5759
{
@@ -154,7 +156,7 @@ public function getInstance()
154156
);
155157
}
156158

157-
$this->instance = new $this->payload['class'];
159+
$this->instance = new $this->payload['class']();
158160
$this->instance->job = $this;
159161
$this->instance->args = $this->getArguments();
160162
return $this->instance;
@@ -164,6 +166,7 @@ public function getInstance()
164166
* Actually execute a job by calling the perform method on the class
165167
* associated with the job with the supplied arguments.
166168
*
169+
* @return bool
167170
* @throws Resque_Exception When the job's class could not be found or it does not contain a perform method.
168171
*/
169172
public function perform()
@@ -194,6 +197,8 @@ public function perform()
194197

195198
/**
196199
* Mark the current job as having failed.
200+
*
201+
* @param $exception
197202
*/
198203
public function fail($exception)
199204
{
@@ -216,6 +221,7 @@ public function fail($exception)
216221

217222
/**
218223
* Re-queue the current job.
224+
* @return string
219225
*/
220226
public function recreate()
221227
{

0 commit comments

Comments
 (0)