src/Builder/BaseTypeClassBuilder.php
private function buildValidatePresenceLinesForScalarField(ScalarField $field, $line_indent, array &$validator_lines)
    {
        if ($field instanceof RequiredInterface && $field instanceof UniqueInterface) {
            if ($field->isRequired() && $field->isUnique()) {
                $validator_lines[] = $line_indent . $this->buildValidatePresenceAndUniquenessLine($field->getName(), $field->getUniquenessContext());
            } elseif ($field->isRequired()) {
                $validator_lines[] = $line_indent . $this->buildValidatePresenceLine($field->getName());
            } elseif ($field->isUnique()) {
                $validator_lines[] = $line_indent . $this->buildValidateUniquenessLine($field->getName(), $field->getUniquenessContext());
            }
        } elseif ($field instanceof RequiredInterface && $field->isRequired()) {
            $validator_lines[] = $line_indent . $this->buildValidatePresenceLine($field->getName());
        } elseif ($field instanceof UniqueInterface && $field->isUnique()) {
            $validator_lines[] = $line_indent . $this->buildValidateUniquenessLine($field->getName(), $field->getUniquenessContext());
        }
    }
private function buildValidatePresenceLinesForScalarField(ScalarField $field, $line_indent, array &$validator_lines)
    {
        if ($field instanceof RequiredInterface && $field instanceof UniqueInterface) {
            if ($field->isRequired() && $field->isUnique()) {
                $validator_lines[] = $line_indent . $this->buildValidatePresenceAndUniquenessLine($field->getName(), $field->getUniquenessContext());
            } elseif ($field->isRequired()) {
                $validator_lines[] = $line_indent . $this->buildValidatePresenceLine($field->getName());
            } elseif ($field->isUnique()) {
                $validator_lines[] = $line_indent . $this->buildValidateUniquenessLine($field->getName(), $field->getUniquenessContext());
            }
        } elseif ($field instanceof RequiredInterface && $field->isRequired()) {
            $validator_lines[] = $line_indent . $this->buildValidatePresenceLine($field->getName());
        } elseif ($field instanceof UniqueInterface && $field->isUnique()) {
            $validator_lines[] = $line_indent . $this->buildValidateUniquenessLine($field->getName(), $field->getUniquenessContext());
        }
    }
private function buildValidatePresenceLinesForScalarField ( ScalarField $ field , $ line_indent , array & $ validator_lines ) { if ( $ field instanceof RequiredInterface && $ field instanceof UniqueInterface ) { if ( $ field -> isRequired ( ) && $ field -> isUnique ( ) ) { $ validator_lines [ ] = $ line_indent . $ this -> buildValidatePresenceAndUniquenessLine ( $ field -> getName ( ) , $ field -> getUniquenessContext ( ) ) ; } elseif ( $ field -> isRequired ( ) ) { $ validator_lines [ ] = $ line_indent . $ this -> buildValidatePresenceLine ( $ field -> getName ( ) ) ; } elseif ( $ field -> isUnique ( ) ) { $ validator_lines [ ] = $ line_indent . $ this -> buildValidateUniquenessLine ( $ field -> getName ( ) , $ field -> getUniquenessContext ( ) ) ; } } elseif ( $ field instanceof RequiredInterface && $ field -> isRequired ( ) ) { $ validator_lines [ ] = $ line_indent . $ this -> buildValidatePresenceLine ( $ field -> getName ( ) ) ; } elseif ( $ field instanceof UniqueInterface && $ field -> isUnique ( ) ) { $ validator_lines [ ] = $ line_indent . $ this -> buildValidateUniquenessLine ( $ field -> getName ( ) , $ field -> getUniquenessContext ( ) ) ; } }
Build validate lines for scalar fields.

@param ScalarField $field
@param string      $line_indent
@param array       $validator_lines
Build validate lines for scalar fields .