Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
fixing broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyquinton committed May 15, 2014
1 parent 0713467 commit d6385f0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Opg/Core/Model/Entity/CaseItem/CaseItem.php
Expand Up @@ -737,8 +737,10 @@ public function getRagRating()
'3' => 0
);

foreach ($this->tasks as $taskItem) {
$rag[$taskItem->getRagRating()]++;
if(!empty($tasks)) {
foreach ($this->tasks as $taskItem) {
$rag[$taskItem->getRagRating()]++;
}
}

//Apply rules
Expand All @@ -756,10 +758,12 @@ public function getRagRating()
*/
public function getRagTotal()
{
$total = 0;
$total = 0;

foreach ($this->tasks as $taskItem) {
$total += $taskItem->getRagRating();
if(!empty($tasks)) {
foreach ($this->tasks as $taskItem) {
$total += $taskItem->getRagRating();
}
}

return $total;
Expand Down

0 comments on commit d6385f0

Please sign in to comment.