src/AnnotationProcessor/DoctrineAnnotationProcessor.php
protected function processColumn(Column $column, PropertyInformation $information): void
    {
        $information->setType($this->transformType($column->type));
        $information->setFixedPointNumber(strtolower($column->type) === Type::DECIMAL);
        $information->setLength($column->length ?: 0);
        $information->setPrecision($column->precision);
        $information->setScale($column->scale);
        $information->setUnique($column->unique !== false);
        $information->setNullable($column->nullable !== false || \in_array($column->type, self::NULLABLE_TYPES, true));
        $information->setIntegerSize($this->getIntegerSizeForType($column->type));

        if ($information->isFixedPointNumber()
            && $information->getPrecision() === 0
            && $information->getScale() === 0
        ) {
            throw new InvalidColumnSettingsException(
                sprintf(
                    'Decimal type of "%s::%s" has scale and precision set to 0 or not set at all.'
                    . PHP_EOL . 'Usage: e.g. @ORM\Column(type="decimal", precision=2, scale=4).'
                    . PHP_EOL . '"The precision represents the number of digits that are stored for values,'
                    . PHP_EOL . ' and the scale represents the number of digits that can be stored'
                    . PHP_EOL . ' following the decimal point".',
                    $information->getClass(),
                    $information->getName()
                )
            );
        }
    }
protected function processColumn(Column $column, PropertyInformation $information): void
    {
        $information->setType($this->transformType($column->type));
        $information->setFixedPointNumber(strtolower($column->type) === Type::DECIMAL);
        $information->setLength($column->length ?: 0);
        $information->setPrecision($column->precision);
        $information->setScale($column->scale);
        $information->setUnique($column->unique !== false);
        $information->setNullable($column->nullable !== false || \in_array($column->type, self::NULLABLE_TYPES, true));
        $information->setIntegerSize($this->getIntegerSizeForType($column->type));

        if ($information->isFixedPointNumber()
            && $information->getPrecision() === 0
            && $information->getScale() === 0
        ) {
            throw new InvalidColumnSettingsException(
                sprintf(
                    'Decimal type of "%s::%s" has scale and precision set to 0 or not set at all.'
                    . PHP_EOL . 'Usage: e.g. @ORM\Column(type="decimal", precision=2, scale=4).'
                    . PHP_EOL . '"The precision represents the number of digits that are stored for values,'
                    . PHP_EOL . ' and the scale represents the number of digits that can be stored'
                    . PHP_EOL . ' following the decimal point".',
                    $information->getClass(),
                    $information->getName()
                )
            );
        }
    }
protected function processColumn ( Column $ column , PropertyInformation $ information ) : void { $ information -> setType ( $ this -> transformType ( $ column -> type ) ) ; $ information -> setFixedPointNumber ( strtolower ( $ column -> type ) === Type :: DECIMAL ) ; $ information -> setLength ( $ column -> length ? : 0 ) ; $ information -> setPrecision ( $ column -> precision ) ; $ information -> setScale ( $ column -> scale ) ; $ information -> setUnique ( $ column -> unique !== false ) ; $ information -> setNullable ( $ column -> nullable !== false || \ in_array ( $ column -> type , self :: NULLABLE_TYPES , true ) ) ; $ information -> setIntegerSize ( $ this -> getIntegerSizeForType ( $ column -> type ) ) ; if ( $ information -> isFixedPointNumber ( ) && $ information -> getPrecision ( ) === 0 && $ information -> getScale ( ) === 0 ) { throw new InvalidColumnSettingsException ( sprintf ( 'Decimal type of "%s::%s" has scale and precision set to 0 or not set at all.' . PHP_EOL . 'Usage: e.g. @ORM\Column(type="decimal", precision=2, scale=4).' . PHP_EOL . '"The precision represents the number of digits that are stored for values,' . PHP_EOL . ' and the scale represents the number of digits that can be stored' . PHP_EOL . ' following the decimal point".' , $ information -> getClass ( ) , $ information -> getName ( ) ) ) ; } }
Process a Column Annotation, extract information about scale and
precision for decimal types, length and size of string and integer
types, if the column may be null and if it should be a unique value.

@param Column $column
@param PropertyInformation $information

@throws InvalidColumnSettingsException
@throws \DomainException
@throws \InvalidArgumentException
@throws \RangeException
@throws \Hostnet\Component\AccessorGenerator\Reflection\Exception\ClassDefinitionNotFoundException
@throws \OutOfBoundsException
Process a Column Annotation extract information about scale and precision for decimal types length and size of string and integer types if the column may be null and if it should be a unique value .