Skip to content

Commit

Permalink
Use BatchJobStatus enum constants in examples try2
Browse files Browse the repository at this point in the history
Use BatchJobStatus class enum constants that should be always more legit than know the final string value used.
  • Loading branch information
shakaran authored Oct 9, 2016
1 parent 06dcb47 commit 2422a6b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ public static function runExample(
$batchJob->getStatus());

$pollAttempts++;
if ($batchJob->getStatus() !== 'ACTIVE' &&
$batchJob->getStatus() !== 'AWAITING_FILE' &&
$batchJob->getStatus() !== 'CANCELING') {
if ($batchJob->getStatus() !== BatchJobStatus::ACTIVE &&
$batchJob->getStatus() !== BatchJobStatus::AWAITING_FILE &&
$batchJob->getStatus() !== BatchJobStatus::CANCELING) {
$isPending = false;
}
} while ($isPending && $pollAttempts <= self::MAX_POLL_ATTEMPTS);
Expand Down

0 comments on commit 2422a6b

Please sign in to comment.