Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Contract for all recordable migration operations. |
| 5 | * |
| 6 | * This Source Code Form is subject to the terms of the Mozilla Public License, |
| 7 | * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
| 8 | * obtain one at https://mozilla.org/MPL/2.0/. |
| 9 | * |
| 10 | * @package phpMyFAQ |
| 11 | * @author Thorsten Rinne <thorsten@phpmyfaq.de> |
| 12 | * @copyright 2023-2026 phpMyFAQ Team |
| 13 | * @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
| 14 | * @link https://www.phpmyfaq.de |
| 15 | * @since 2026-01-25 |
| 16 | */ |
| 17 | |
| 18 | declare(strict_types=1); |
| 19 | |
| 20 | namespace phpMyFAQ\Setup\Migration\Operations; |
| 21 | |
| 22 | interface OperationInterface |
| 23 | { |
| 24 | /** |
| 25 | * Returns the type of operation (e.g., 'sql', 'config_add', 'file_copy'). |
| 26 | */ |
| 27 | public function getType(): string; |
| 28 | |
| 29 | /** |
| 30 | * Returns a human-readable description of the operation. |
| 31 | */ |
| 32 | public function getDescription(): string; |
| 33 | |
| 34 | /** |
| 35 | * Executes the operation. |
| 36 | * |
| 37 | * @return bool True on success, false on failure |
| 38 | */ |
| 39 | public function execute(): bool; |
| 40 | |
| 41 | /** |
| 42 | * Returns an array representation of the operation for dry-run output. |
| 43 | * |
| 44 | * @return array<string, mixed> |
| 45 | */ |
| 46 | public function toArray(): array; |
| 47 | } |