scythe-codegen 0.16.1

Polyglot code generation backends for scythe
Documentation
[backend]
name = "php-pdo"
language = "php"
file_extension = "php"
engine = "sqlite"
description = "PHP code generation targeting PDO with SQLite"

[types.scalars]
bool = "bool"
int16 = "int"
int32 = "int"
int64 = "int"
float32 = "float"
float64 = "float"
string = "string"
bytes = "string"
uuid = "string"
decimal = "float"
date = "string"
time = "string"
time_tz = "string"
datetime = "string"
datetime_tz = "string"
interval = "string"
json = "string"
inet = "string"

[types.containers]
array = "array"
nullable = "?{T}"
json_typed = "{T}"

[types.docblock_containers]
# PHP has no generics in a native type position, so `[types.containers]` must
# map `array` to a bare `array`. PHPStan reads that as `array<mixed, mixed>`,
# which is a level-9 finding, so the element type is kept here instead and
# rendered into `@var`/`@param` docblocks. Containers omitted here fall back to
# `[types.containers]`.
array = "array<{T}>"

[naming]
struct_case = "PascalCase"
fn_case = "camelCase"
enum_variant_case = "SCREAMING_SNAKE_CASE"
row_suffix = "Row"
sanitize_field_names = true
reserved = [
  "abstract",
  "and",
  "array",
  "as",
  "break",
  "callable",
  "case",
  "catch",
  "class",
  "clone",
  "const",
  "continue",
  "declare",
  "default",
  "die",
  "do",
  "echo",
  "else",
  "elseif",
  "empty",
  "enddeclare",
  "endfor",
  "endforeach",
  "endif",
  "endswitch",
  "endwhile",
  "eval",
  "exit",
  "extends",
  "final",
  "finally",
  "fn",
  "for",
  "foreach",
  "function",
  "global",
  "goto",
  "if",
  "implements",
  "include",
  "instanceof",
  "insteadof",
  "interface",
  "isset",
  "list",
  "match",
  "namespace",
  "new",
  "or",
  "print",
  "private",
  "protected",
  "public",
  "require",
  "return",
  "static",
  "switch",
  "throw",
  "trait",
  "try",
  "unset",
  "use",
  "var",
  "while",
  "xor",
  "yield",
  "int",
  "float",
  "bool",
  "string",
  "true",
  "false",
  "null",
  "void",
  "iterable",
  "object",
  "mixed",
  "never",
  "readonly",
]

[imports.rules]