If a property can have multiple data types you can declare this by separating the different types with a pipe:


/**
 * The database log.
 *
 * @var \Drupal\rdf_entity\Database\Driver\sparql\Log|null
 */
protected $log;

Currently the VariableCommentSniff doesn't account for this and throws this false positive:

Expected "\Drupal\rdf_entity\Database\Driver\sparql\Lognull" but found "\Drupal\rdf_entity\Database\Driver\sparql\Log|null" for @var tag in member variable comment

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Status: Active » Needs review

  • klausi committed dff18fa on 8.x-2.x authored by pfrenssen
    Issue #2790657: Support multiple type declarations in @var docs on...
klausi’s picture

Status: Needs review » Fixed

Merged, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.