| 1 | <?php |
||
| 15 | final class Version20180913205455 extends AbstractMigration |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @param Schema $schema |
||
| 19 | */ |
||
| 20 | public function up(Schema $schema): void |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param Schema $schema |
||
| 27 | * @throws DBALException |
||
| 28 | */ |
||
| 29 | public function postUp(Schema $schema): void |
||
| 53 | |||
| 54 | private function determineAddress(string $addr): ?string |
||
| 55 | { |
||
| 56 | if ($addr === IpAddress::LOCALHOST) { |
||
| 57 | return $addr; |
||
| 58 | } |
||
| 59 | |||
| 60 | try { |
||
| 61 | return (string) IpAddress::fromString($addr)->getObfuscatedCopy(); |
||
| 62 | } catch (WrongIpException $e) { |
||
| 63 | return null; |
||
| 64 | } |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param Schema $schema |
||
| 69 | */ |
||
| 70 | public function down(Schema $schema): void |
||
| 74 | } |
||
| 75 |