| @@ 508-518 (lines=11) @@ | ||
| 505 | * |
|
| 506 | * @return int Status::FAILED|Status::WARNING|Status::SUCCESS |
|
| 507 | */ |
|
| 508 | public function getStatus(): int |
|
| 509 | { |
|
| 510 | if ($this->getPercentage() < $this->getWarning()) { |
|
| 511 | return Status::FAILED; |
|
| 512 | } |
|
| 513 | if ($this->getPercentage() < $this->getSuccess()) { |
|
| 514 | return Status::WARNING; |
|
| 515 | } |
|
| 516 | ||
| 517 | return Status::SUCCESS; |
|
| 518 | } |
|
| 519 | } |
|
| 520 | ||
| @@ 426-436 (lines=11) @@ | ||
| 423 | * |
|
| 424 | * @return int Status::FAILED|Status::WARNING|Status::SUCCESS |
|
| 425 | */ |
|
| 426 | public function getStatus(): int |
|
| 427 | { |
|
| 428 | if ($this->getPercentage() < $this->campaign->getWarning()) { |
|
| 429 | return Status::FAILED; |
|
| 430 | } |
|
| 431 | if ($this->getPercentage() < $this->campaign->getSuccess()) { |
|
| 432 | return Status::WARNING; |
|
| 433 | } |
|
| 434 | ||
| 435 | return Status::SUCCESS; |
|
| 436 | } |
|
| 437 | } |
|
| 438 | ||