Skip to content

Commit

Permalink
Add PHPDoc blocks to AbstractMigration
Browse files Browse the repository at this point in the history
  • Loading branch information
koninka committed Sep 4, 2020
1 parent 4eef7b0 commit 62f6570
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/Doctrine/Migrations/AbstractMigration.php
Expand Up @@ -60,11 +60,19 @@ public function isTransactional() : bool
return true;
}

/**
* Description of this migration.
*
* Describe what this migration does in simple terms. This information is displayed when you view the list of migrations.
*/
public function getDescription() : string
{
return '';
}

/**
* Warn with a message if some condition is met.
*/
public function warnIf(bool $condition, string $message = 'Unknown Reason') : void
{
if (! $condition) {
Expand Down Expand Up @@ -155,6 +163,11 @@ public function getSql() : array
return $this->plannedSql;
}

/**
* Write some debug information to the console.
*
* Debug information is written with debug().
*/
protected function write(string $message) : void
{
$this->logger->notice($message, ['migration' => $this]);
Expand Down

0 comments on commit 62f6570

Please sign in to comment.