public function finalize()
{
if (!$this->isFinalized) {
$this->normalizeDefinition();
$this->isFinalized = true;
$this->definition = new MockDefinition($this->types, $this->customMethods, $this->customProperties, $this->customStaticMethods, $this->customStaticProperties, $this->customConstants, $this->className, $this->isTraitSupported, $this->isRelaxedKeywordsSupported);
}
return $this;
}