/** * Execute the build process */ public function build() { $this->builder->generatedValue($this->strategy); if ($this->name) { $this->builder->setSequenceGenerator($this->name, $this->size, $this->initial); } if ($this->generator) { $this->classMetadata->setCustomGeneratorDefinition(['class' => $this->generator]); } }
/** * @param ClassMetadata $metadata * @param ReflectionProperty $property * @param ConfigAnnotation $annotation */ public function build(ClassMetadata $metadata, ReflectionProperty $property, ConfigAnnotation $annotation) { $builder = new FieldBuilder(new ClassMetadataBuilder($metadata), ['fieldName' => $property->getName(), 'type' => Type::JSON_ARRAY]); $builder->build(); }
/** * @return Field */ public function build() { $this->builder->build(); return $this; }
public function test_changing_the_alloc_size_or_initial_value_in_sequence_without_setting_a_name_will_get_ignored() { $this->field->expects($this->once())->method('generatedValue')->with('SEQUENCE'); $this->field->expects($this->never())->method('setSequenceGenerator'); $this->fluent->sequence(null, 42, 23)->build(); }