You are here

protected function Notify::getComment in Drupal 7 to 8/9 Module Upgrader 8

1 call to Notify::getComment()
Notify::execute in src/Plugin/DMU/Fixer/Notify.php
Executes the plugin.

File

src/Plugin/DMU/Fixer/Notify.php, line 34

Class

Notify
Plugin annotation @Fixer( id = "notify" )

Namespace

Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer

Code

protected function getComment(NodeInterface $node) {
  if ($this
    ->supportsDocComments($node)) {

    /** @var \Pharborist\DocCommentTrait $node */
    $comment = $node
      ->getDocComment() ?: DocCommentNode::create('');
    return $comment
      ->getCommentText();
  }
  else {
    return '';
  }
}