src/Atomizer/Renderer.php
protected function render(Source $source, string $format, ...$values)
    {
        $serializer = $this->getSerializer();

        $rendered = [];
        foreach ($values as $value) {
            if ($value instanceof AbstractTable) {
                $rendered[] = $serializer->serialize(
                    substr($value->getName(), strlen($value->getPrefix()))
                );
                continue;
            }

            if ($value instanceof AbstractColumn) {
                $rendered[] = $this->columnOptions($serializer, $value);
                continue;
            }

            if ($value instanceof AbstractIndex) {
                $rendered[] = $this->indexOptions($serializer, $value);
                continue;
            }

            if ($value instanceof AbstractForeignKey) {
                $rendered[] = $this->foreignKeyOptions($serializer, $value);
                continue;
            }

            // numeric array
            if (is_array($value) && count($value) > 0 && is_numeric(array_keys($value)[0])) {
                $rendered[] = '["' . join('", "', $value) . '"]';
                continue;
            }

            $rendered[] = $serializer->serialize($value);
        }

        $lines = sprintf($format, ...$rendered);
        foreach (explode("\n", $lines) as $line) {
            $source->addLine($line);
        }
    }
protected function render(Source $source, string $format, ...$values)
    {
        $serializer = $this->getSerializer();

        $rendered = [];
        foreach ($values as $value) {
            if ($value instanceof AbstractTable) {
                $rendered[] = $serializer->serialize(
                    substr($value->getName(), strlen($value->getPrefix()))
                );
                continue;
            }

            if ($value instanceof AbstractColumn) {
                $rendered[] = $this->columnOptions($serializer, $value);
                continue;
            }

            if ($value instanceof AbstractIndex) {
                $rendered[] = $this->indexOptions($serializer, $value);
                continue;
            }

            if ($value instanceof AbstractForeignKey) {
                $rendered[] = $this->foreignKeyOptions($serializer, $value);
                continue;
            }

            // numeric array
            if (is_array($value) && count($value) > 0 && is_numeric(array_keys($value)[0])) {
                $rendered[] = '["' . join('", "', $value) . '"]';
                continue;
            }

            $rendered[] = $serializer->serialize($value);
        }

        $lines = sprintf($format, ...$rendered);
        foreach (explode("\n", $lines) as $line) {
            $source->addLine($line);
        }
    }
Render values and options into source.

@param Source $source
@param string $format
@param array  ...$values