Closed (fixed)
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Oct 2020 at 14:33 UTC
Updated:
18 Nov 2020 at 14:59 UTC
Jump to comment: Most recent
We've recently added the InlineVariableComment rule, which attempts to fix all inline @var comments which aren't using the /** */ delimiters. This currently results in broken PHP code when the /** */ delimiters are contained within a comment, as it will attempt to add a doc comment within a doc comment, for example:
// /** @var \Drupal\node\NodeInterface $node */
Will result in:
/** /** @var \Drupal\node\NodeInterface $node */ */
We should probably just ignore the @var comments when they're contained within another comment, as it will most likely just be a commented piece of code.
Comments
Comment #2
arkener commentedPR: https://github.com/pfrenssen/coder/pull/122
Comment #3
klausiThanks, I will add the comment and push this.
Comment #6
klausiMerged, thanks a lot!