Skip to content

Instantly share code, notes, and snippets.

@radimvaculik
Created August 11, 2020 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radimvaculik/b14748ada35d6c0049e46c23509f54f5 to your computer and use it in GitHub Desktop.
Save radimvaculik/b14748ada35d6c0049e46c23509f54f5 to your computer and use it in GitHub Desktop.
JsonMapper examples #2
<?php
declare(strict_types = 1);
namespace App\Data\Preset\Model;
class Preset
{
public int $id;
public string $name;
}
<?php
declare(strict_types = 1);
namespace App\Data\Preset\Model;
class PresetCollection
{
/** @var Preset[] $global */
public array $global;
/** @var Preset[] $custom */
public array $custom;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment