Global reformat

This commit is contained in:
Daniel Mason 2018-05-25 21:03:48 +12:00
parent 14c0e26559
commit 51fda513f4
11 changed files with 532 additions and 533 deletions

View File

@ -1,4 +1,5 @@
<?php
class PHP_Job
{
public function perform()

View File

@ -1,4 +1,5 @@
<?php
class Long_PHP_Job
{
public function perform()

View File

@ -1,4 +1,5 @@
<?php
class PHP_Error_Job
{
public function perform()

View File

@ -8,7 +8,7 @@ Resque_Event::listen('beforePerform', array('My_Resque_Plugin', 'beforePerform')
Resque_Event::listen('afterPerform', array('My_Resque_Plugin', 'afterPerform'));
Resque_Event::listen('onFailure', array('My_Resque_Plugin', 'onFailure'));
class My_Resque_Plugin
class Sample_Resque_Plugin
{
public static function afterEnqueue($class, $arguments)
{

View File

@ -199,8 +199,7 @@ class Resque_Job
}
Resque_Event::trigger('afterPerform', $this);
}
// beforePerform/setUp have said don't perform this job. Return.
} // beforePerform/setUp have said don't perform this job. Return.
catch (Resque_Job_DontPerform $e) {
return false;
}

View File

@ -239,8 +239,7 @@ class Resque_Redis
foreach ($args[0] AS $i => $v) {
$args[0][$i] = self::$defaultNamespace . $v;
}
}
else {
} else {
$args[0] = self::$defaultNamespace . $args[0];
}
}

View File

@ -11,7 +11,6 @@ use Psr\Log\LoggerInterface;
* @author Chris Boulton <chris@bigcommerce.com>
* @license http://www.opensource.org/licenses/mit-license.php
*/
class Resque_Worker
{
/**

View File

@ -282,8 +282,7 @@ class Resque_Tests_WorkerTest extends Resque_Tests_TestCase
Resque::enqueue('jobs', 'Test_Job_2');
$i = 1;
while($job = $worker->reserve(true, 2))
{
while ($job = $worker->reserve(true, 2)) {
$this->assertEquals('Test_Job_' . $i, $job->payload['class']);
if ($i == 2) {