public function __construct(Type $type = null, array $properties = []) { if ($type) { $this->setType($type); } if (!empty($properties)) { $this->setProperties($properties); } }