original_string: public static function format($hook, $type, $notification, $params) {
  
  		$event = elgg_extract('event', $params);
  		$comment = $event->getObject();
  		$recipient = elgg_extract('recipient', $params);
  		$language = elgg_extract('language', $params);
  
  		if (!$comment instanceof Comment) {
  			return;
  		}
  
  		$entity = $comment->getContainerEntity();
  		if (!$entity) {
  			return;
  		}
  
  		$messages = (new NotificationFormatter($comment, $recipient, $language))->prepare();
  
  		$notification->summary = $messages->summary;
  		$notification->subject = $messages->subject;
  		$notification->body = $messages->body;
  
  		return $notification;
  	}
code: public static function format($hook, $type, $notification, $params) {
  
  		$event = elgg_extract('event', $params);
  		$comment = $event->getObject();
  		$recipient = elgg_extract('recipient', $params);
  		$language = elgg_extract('language', $params);
  
  		if (!$comment instanceof Comment) {
  			return;
  		}
  
  		$entity = $comment->getContainerEntity();
  		if (!$entity) {
  			return;
  		}
  
  		$messages = (new NotificationFormatter($comment, $recipient, $language))->prepare();
  
  		$notification->summary = $messages->summary;
  		$notification->subject = $messages->subject;
  		$notification->body = $messages->body;
  
  		return $notification;
  	}
code_tokens: public static function format ( $ hook , $ type , $ notification , $ params ) { $ event = elgg_extract ( 'event' , $ params ) ; $ comment = $ event -> getObject ( ) ; $ recipient = elgg_extract ( 'recipient' , $ params ) ; $ language = elgg_extract ( 'language' , $ params ) ; if ( ! $ comment instanceof Comment ) { return ; } $ entity = $ comment -> getContainerEntity ( ) ; if ( ! $ entity ) { return ; } $ messages = ( new NotificationFormatter ( $ comment , $ recipient , $ language ) ) -> prepare ( ) ; $ notification -> summary = $ messages -> summary ; $ notification -> subject = $ messages -> subject ; $ notification -> body = $ messages -> body ; return $ notification ; }
docstring: Prepare a notification for when comment is created
  
  @param string       $hook         Equals 'prepare'
  @param string       $type         Equals ''notification:create:object:comment'
  @param Notification $notification Notification object
  @param array        $params       Additional params
  
  @return Notification
docstring_tokens: Prepare a notification for when comment is created