PHP code example of dezer / fake-generator-data-transfer-object

1. Go to this page and download the library: Download dezer/fake-generator-data-transfer-object library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dezer / fake-generator-data-transfer-object example snippets


    /** @FakeGenerator lastName */
    public string $last_name;
    /** @FakeGenerator middleName */
    public string $middle_name;
    /** @FakeGenerator firstName */
    public string $first_name;

    /** @FakeGenerator dateTimeBetween ("-30 years", "-19 years") */
    public DateTimeInterface $issue_date;

    /** @FakeGenerator numerify ("+7 (9##) ###-##-##") */
    public string $phone;

    /** @FakeGenerator regexify ("[0-9]{4}") */
    public string $series;
    /** @FakeGenerator regexify ("[0-9]{6}") */
    public string $number;

    /** @FakeGenerator %Faker\Generator->methodName% ("%param1%", "%param2%") */
    /** @FakeCollection %Name\Space\To\Dto% */