kotfire/vscode-php-add-property

Type hint property declaration

Closed this issue · 3 comments

Thanks a lot for this extension!

Would it be possibile to add a docblock with property definition?

Example

/** @var \App\Models\Post  */
private $post;

public function __construct(\App\Models\Post $post)
{
    $this->post = $post;
}

Go to settings and enable phpAddProperty.property.docblock.add. Check the related settings too to customize it to your needs.

Let me know if you face any issues.

PD: Do you think I could improve the settings discovery?

Thanks a lot, @kotfire !

How about adding inside each feature description in README which settings are available for given feature and how the change the outcome?

Something like this:

### Add a property

![Add a property demo](images/add.gif)

#### Add property with docblock
To apply docblok notation on your properties, you'll have to enable `phpAddProperty.property.docblock.add`

What do you think about it?

Thank you for your feedback. I'll open a new issue to discuss improving documentation.

I'm closing this, feel free to add a comment if needed or open a new one.