zeleznypa opened a new issue, #4614:
URL: https://github.com/apache/netbeans/issues/4614

   ### Description
   
   When I have a code with 
„[array-shapes](https://phpstan.org/writing-php-code/phpdoc-types#array-shapes)“
 phpDoc, the „fix import“ functionality don't understand them.
   
   ```php
   class Bar
   {
       /**
        * @param array<'foo', Foo> $data
        */
       public function doSomething(array $data): Foo {
           return $data['foo'];
       }
   }
   ```
   
   The „fix import“ functionality don't understand:
   <img width="471" alt="Snímek obrazovky 2022-09-10 v 14 28 48" 
src="https://user-images.githubusercontent.com/1191472/189484898-23c2a662-7057-48f3-9643-700b76bed2f2.png";>
   
   
   
   ### Use case/motivation
   
   I want to have code compatible with static-analysis but sometimes I have to 
describe the array-shapes like this.
   And because the Netbeans don't understand this, they can't see, that `Foo` 
class there is from different namespace and remove the definition from  usages.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to