jacobdekeizer / json-to-php-generator

Generate PHP classes from json
https://jacobdekeizer.github.io/json-to-php-generator
MIT License
62 stars 18 forks source link

Add Doc String for old php versions #47

Open lucasres opened 1 month ago

lucasres commented 1 month ago

Hello, your project is very good, but I believe we could add a checkbox that would include the type doc string. This is useful for older versions of PHP.

Can i help to implementation

example:

class Barr
{
    private $id;
...

with makerd combox for doc string, will be like this:

class Bar
{
    /**
     * @var int
    */
    private $id;
...
jacobdekeizer commented 1 month ago

Hi @lucasres, if you select php 7.3 and in the tab Docblock -> Property docblock select All, you will get this result.

As an improvement we should make the Only necessary option react to PHP 7.3 being selected and include the docblocks automatically.