phpfit/source-generator

Source generator based on provided configs

1.0.1 2025-08-15 03:37 UTC

This package is auto-updated.

Last update: 2025-08-15 03:37:45 UTC


README

Generate php source code based on provided configs. This module is not yet completed.

Installation

composer require phpfit/source-generator

Usage

<?php

use PhpFit\SourceGenerator\Generator;

$array = [
    'string' => 'string',
    'escape' => 'do\'a',
    'integer' => 12,
    'float' => 12.33
];

$source = Generator::array($array);

TODO

  1. Rewrite function
  2. Recreate object class
  3. Shorten inline array
  4. Class writer

License

The phpfit/env library is licensed under the MIT license. See License File for more information.