Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291503

Add @method PhpDoc for EntityStorageInterface descendants

$
0
0

Problem/Motivation

With the current typehinting an IDE can't provide proper autocompletions for methods and other inspections.

Steps to reproduce

class C1 {
  protected \Drupal\node\NodeStorageInterface $nodeStorage;

  public function m1() {
    foreach ($this->nodeStorage->loadMultiple() as $node) {
      $node->isPromoted();
    }
  }
}

Proposed resolution

Add @method PhpDoc entries for every EntityStorageInterface descendants.


Viewing all articles
Browse latest Browse all 291503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>