phpfit/source-generator

Source generator based on provided configs

Installs: 9

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/phpfit/source-generator

1.0.2 2025-08-23 06:09 UTC

This package is auto-updated.

Last update: 2025-11-23 06:46:58 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/source-generator library is licensed under the MIT license. See License File for more information.