protected function initializeProperty(ClassFileDefinition $file, PropertyDefinition $property) { $fqcn = new FullyQualifiedClassName('Doctrine\\Common\\Collections\\ArrayCollection'); $file->addUse($fqcn->getFullQualifiedClassName()); $arrayCollection = new ObjectValue($fqcn); $property->setDefaultValue($arrayCollection); $construct = $this->getConstructor($file); $construct->addLine(sprintf('$this->%s = %s;', $property->getName()->toLowerCamelCase(), $arrayCollection->getPhpFormatedValue())); }