jwoehr commented on issue #8458:
URL: https://github.com/apache/netbeans/issues/8458#issuecomment-2873515218

   @matthiasblaesing I've figured out what is happening with
   ```php
   use Stage\FactoryTrait {
           match as private generatedMatch;
       }
   ```
   `match` here is being interpreted by NetBeans PHP support as the (relatively 
new) PHP keyword `match`.
   However, in this context, `match` means the function from `FactoryTrait`:
   
   ```php
       public static function match(QueryInterface|array $query): MatchStage
       {
           return new MatchStage($query);
       }
   ```
   The code is hiding the `match` function so it can overload the name and use 
it in the `Stage` class with a different signature.
   
   MongoDB development team must have named `match` after the MongoDB 
aggregation operator it implements named `$match` (before `match` became a 
keyword in PHP). NetBeans PHP support is intepreting the lexeme `match` as the 
PHP keyword rather than as an identifier.


-- 
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