Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHPDoc blocks to AbstractMigration #1052

Open
wants to merge 1 commit into
base: 3.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tautological, either improve or remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

*
* Describe what this migration does in simple terms. This information is displayed when you view the list of migrations.
*/
Comment on lines +63 to +67
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Description of this migration.
*
* Describe what this migration does in simple terms. This information is displayed when you view the list of migrations.
*/
/**
* 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's made fairly clear just by reading the signature (you don't have to read the code inside the method)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

*/
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug information is written with debug(), this is a notice.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

*
* Debug information is written with debug().
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I mean it should, but it's actually written with notice(), so that comment is just misleading

*/
protected function write(string $message) : void
{
$this->logger->notice($message, ['migration' => $this]);
Expand Down