1<?php 2 3declare(strict_types=1); 4 5namespace JMS\Serializer\Tests\Fixtures; 6 7use JMS\Serializer\Annotation as Serializer; 8 9class ParentSkipWithEmptyChild 10{ 11 private $c = 'c'; 12 13 private $d = 'd'; 14 15 /** 16 * @Serializer\SkipWhenEmpty() 17 * 18 * @var InlineChild 19 */ 20 private $child; 21 22 public function __construct($child = null) 23 { 24 $this->child = $child ?: new InlineChild(); 25 } 26} 27