Created
April 27, 2021 18:23
-
-
Save erop/da18add9421f7dcebd2dcb8bbc14bda1 to your computer and use it in GitHub Desktop.
Class Passport annotated with @DocumentField
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 | |
declare(strict_types=1); | |
namespace App\DocumentType; | |
use App\Annotation\DocumentField; | |
final class Passport implements IDocument | |
{ | |
/** | |
* @DocumentField(label="First name") | |
*/ | |
public string $firstName; | |
/** | |
* @DocumentField(label="Last name") | |
*/ | |
public string $lastName; | |
/** | |
* @DocumentField(label="Citizenship") | |
*/ | |
public string $citizenship; | |
/** | |
* @DocumentField(label="Series") | |
*/ | |
public string $series; | |
/** | |
* @DocumentField(label="Number") | |
*/ | |
public string $number; | |
public function getType(): string | |
{ | |
return 'passport'; | |
} | |
public function getName(): string | |
{ | |
return 'Passport'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment