Created
October 31, 2021 23:03
-
-
Save ismail1432/021d69c8c3dca36308ec82996cf898e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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