The other way around, you can use a PhpStorm quick-fix Alt+Enter to generate object shapes in a PHPDoc comment or an The syntax is supported for nested objects as well. Now you can define the structure of an arbitrary object in a PHPDoc comment, and PhpStorm will parse the object shape and display a code completion tooltip during assignment of object properties. ![]() While you would normally define objects via declared properties, you may also need proper code completion for dynamic properties with classes like stdClass or functions like _get()/ _set() or json_decode(). In this release, we are adding the ability to define the structure of generic objects via shape annotation, similar to how it is done for array shapes. If this is something you are waiting for, please upvote the issue here. There are still more IDE actions that could benefit from this improvement, such as the Generate PHPDoc intention and the Update PHPDoc Comment quick-fix. This quick-fix is available on doc comments even if the inspection has a No highlighting severity level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |