| 1 | <?php |
||
| 13 | class HasDbDeployCheck implements CheckInterface |
||
| 14 | { |
||
| 15 | const SQL = <<<SQL |
||
| 16 | SELECT `id` |
||
| 17 | FROM `%s` |
||
| 18 | WHERE `%s` = ? |
||
| 19 | SQL; |
||
| 20 | const ERROR_STATUS = 'ALREADY_DEPLOYED'; |
||
| 21 | |||
| 22 | /** @var Connection */ |
||
| 23 | private $connection; |
||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Connection $connection |
||
| 29 | */ |
||
| 30 | 1 | public function __construct(Connection $connection) |
|
| 34 | |||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritdoc |
||
| 39 | */ |
||
| 40 | public function execute(Candidate $candidate): bool |
||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | /** |
||
| 51 | * @inheritdoc |
||
| 52 | */ |
||
| 53 | public function getErrorCode(): string |
||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | /** |
||
| 61 | * @return PDO |
||
| 62 | */ |
||
| 63 | private function getConnection() |
||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | /** |
||
| 71 | * @inheritdoc |
||
| 72 | */ |
||
| 73 | public function getLastErrorMessage(): string |
||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | /** |
||
| 81 | * @return string |
||
| 82 | */ |
||
| 83 | private function getSqlStatement() |
||
| 87 | } |
||
| 88 |