Skip to content

Instantly share code, notes, and snippets.

@ismail1432
Created October 31, 2021 23:03
Show Gist options
  • Save ismail1432/021d69c8c3dca36308ec82996cf898e6 to your computer and use it in GitHub Desktop.
Save ismail1432/021d69c8c3dca36308ec82996cf898e6 to your computer and use it in GitHub Desktop.
<?php
namespace App\Application;
use Symfony\Component\Validator\Constraints as Assert;
final class CreateAUserPayload
{
/**
* @Assert\Type(type="string")
*/
public $name;
/**
* @Assert\Type(type="integer")
*/
public $age;
public function __construct($name, $age)
{
$this->name = $name;
$this->age = $age;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment