23 lines
		
	
	
		
			539 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			539 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @author Daniel J. Summers <daniel@bitbadger.solutions>
 | |
|  * @license MIT
 | |
|  */
 | |
| 
 | |
| declare(strict_types=1);
 | |
| 
 | |
| namespace Test;
 | |
| 
 | |
| use Square\Pjson\{Json, JsonSerialize};
 | |
| 
 | |
| /**
 | |
|  * A test document annotated with pjson attributes using the `JsonSerialize` trait
 | |
|  */
 | |
| class PjsonDocument
 | |
| {
 | |
|     use JsonSerialize;
 | |
| 
 | |
|     public function __construct(#[Json] public PjsonId $id = new PjsonId(''), #[Json] public string $name = '',
 | |
|                                 #[Json('num_value')] public int $numValue = 0, public string $skipped = 'yep') { }
 | |
| }
 |