-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
108 changed files
with
2,034 additions
and
5,446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
namespace Triadev\EsMigration\Business\Mapper; | ||
|
||
class MigrationStatus | ||
{ | ||
const MIGRATION_STATUS_WAIT = 0; | ||
const MIGRATION_STATUS_RUNNING = 1; | ||
const MIGRATION_STATUS_DONE = 2; | ||
const MIGRATION_STATUS_ERROR = 3; | ||
|
||
/** | ||
* Is migration status valid | ||
* | ||
* @param int $status | ||
* @return bool | ||
*/ | ||
public function isMigrationStatusValid(int $status) : bool | ||
{ | ||
$valid = [ | ||
self::MIGRATION_STATUS_WAIT, | ||
self::MIGRATION_STATUS_RUNNING, | ||
self::MIGRATION_STATUS_DONE, | ||
self::MIGRATION_STATUS_ERROR | ||
]; | ||
|
||
if (in_array($status, $valid)) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
Oops, something went wrong.