/** * Instantiate and configure the node according to this definition * * @return Faker\Components\Engine\Common\Composite\TypeNode The node instance * * @throws InvalidDefinitionException When the definition is invalid */ public function getNode() { $type = new Null(); $type->setGenerator($this->generator); $type->setUtilities($this->utilities); $type->setLocale($this->locale); foreach ($this->attributes as $attribute => $value) { $type->setOption($attribute, $value); } return new TypeNode('NullType', $this->eventDispatcher, $type); }