public function __construct() { if (!isset($this->name)) { $this->name = $this->tryInferName(); } Utils::invariant($this->name, 'Type must be named.'); }