Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1656

Typed arrays - docblock awareness

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 10.0, 11.0
    • None
    • php - Editor
    • None

    Description

       

      class Model {
        public function doStuff(): void {
          ...
        }
      }
      
      class Test {
      
       /*
        * @return Model[]
        */
        public function getCollection(): array {
      
         return [new Model(), new Model()];
      
        }
      
      }
      
      $test = new Test();
      $collection = $test->getCollection();
      $collection[0]->(?); // At the moment Netbeans is not aware of the type

      Netbeans should be aware of the types within a collection if they are typehinted.

      Attachments

        Issue Links

          Activity

            People

              Kacer Tomáš Procházka
              Cruiser Bo Andersen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: