@@ -73,8 +73,7 @@ |
||
| 73 | 73 | // Job finshed successfuly... do we remove the job from database? |
| 74 | 74 | $job->setStatus(Job::STATUS_SUCCESS); |
| 75 | 75 | $job->setMessage(null); |
| 76 | - } |
|
| 77 | - catch (\Exception $e) { |
|
| 76 | + } catch (\Exception $e) { |
|
| 78 | 77 | if ($this->logger) { |
| 79 | 78 | $this->logger->debug("Failed: {$job->getClassName()}->{$job->getMethod()}\n{$e->getMessage()}"); |
| 80 | 79 | } |
@@ -20,12 +20,17 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function fibonacci($n) |
| 22 | 22 | { |
| 23 | - if($n == 0) |
|
| 24 | - return 0; //F0 |
|
| 25 | - elseif ($n == 1) |
|
| 26 | - return 1; //F1 |
|
| 27 | - else |
|
| 28 | - return $this->fibonacci($n - 1) + $this->fibonacci($n - 2); |
|
| 23 | + if($n == 0) { |
|
| 24 | + return 0; |
|
| 25 | + } |
|
| 26 | + //F0 |
|
| 27 | + elseif ($n == 1) { |
|
| 28 | + return 1; |
|
| 29 | + } |
|
| 30 | + //F1 |
|
| 31 | + else { |
|
| 32 | + return $this->fibonacci($n - 1) + $this->fibonacci($n - 2); |
|
| 33 | + } |
|
| 29 | 34 | } |
| 30 | 35 | |
| 31 | 36 | public function getName() { |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | if ($priority) { |
| 116 | 116 | $this->assertEquals($priority, $job->getPriority(), |
| 117 | 117 | "Priority should be the same."); |
| 118 | - } |
|
| 119 | - else { |
|
| 118 | + } else { |
|
| 120 | 119 | $this->assertNull($job->getPriority(), "Priority should be null"); |
| 121 | 120 | } |
| 122 | 121 | |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | if ($priority) { |
| 116 | 116 | $this->assertEquals($priority, $job->getPriority(), |
| 117 | 117 | "Priority should be the same."); |
| 118 | - } |
|
| 119 | - else { |
|
| 118 | + } else { |
|
| 120 | 119 | $this->assertNull($job->getPriority(), "Priority should be null"); |
| 121 | 120 | } |
| 122 | 121 | |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | if ($priority) { |
| 116 | 116 | $this->assertEquals($priority, $job->getPriority(), |
| 117 | 117 | "Priority should be the same."); |
| 118 | - } |
|
| 119 | - else { |
|
| 118 | + } else { |
|
| 120 | 119 | $this->assertNull($job->getPriority(), "Priority should be null"); |
| 121 | 120 | } |
| 122 | 121 | |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | if ($priority) { |
| 116 | 116 | $this->assertEquals($priority, $job->getPriority(), |
| 117 | 117 | "Priority should be the same."); |
| 118 | - } |
|
| 119 | - else { |
|
| 118 | + } else { |
|
| 120 | 119 | $this->assertNull($job->getPriority(), "Priority should be null"); |
| 121 | 120 | } |
| 122 | 121 | |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | if ($priority) { |
| 116 | 116 | $this->assertEquals($priority, $job->getPriority(), |
| 117 | 117 | "Priority should be the same."); |
| 118 | - } |
|
| 119 | - else { |
|
| 118 | + } else { |
|
| 120 | 119 | $this->assertNull($job->getPriority(), "Priority should be null"); |
| 121 | 120 | } |
| 122 | 121 | |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | if ($priority) { |
| 116 | 116 | $this->assertEquals($priority, $job->getPriority(), |
| 117 | 117 | "Priority should be the same."); |
| 118 | - } |
|
| 119 | - else { |
|
| 118 | + } else { |
|
| 120 | 119 | $this->assertNull($job->getPriority(), "Priority should be null"); |
| 121 | 120 | } |
| 122 | 121 | |