<commit_before># Code generation library #

This project aims to provide tools for easy code generation and manipulation. Since we're relying on metaprogramming
for a lot of our libraries (Doctrine, Symfony, etc), generating code for this may get a bit tedious. This library aims
to provide easy code generation for:

 * General purpose PHP files and classes
 * Doctrine entities
 * Symfony bundles
 * An alternate implementation for the symfony container builder

Currently, the library is still under development, and if you want to know what's up or would like to help, let me know! You can create issues here, or contact me directly at <EMAIL>.

## But, Doctrine and Symfony already have code generators, why do I need this one? ##

Melp\Cg provides a document-oriented approach to generating and inflecting code. Applying changes to code can easily
be implemented using the provided visitor implementation. This makes both the generation and the use of the
code generator very easy and understandable.

## Building code ##

A builder pattern is provided for quick structural setup, for example:

````
<?php

echo (string)
    (new Buffer())->append(
        new Builder()
            ->file()<commit_msg>another bit of explanation<commit_after># Code generation library #

This project aims to provide tools for easy code generation and manipulation. Since we're relying on metaprogramming
for a lot of our libraries (Doctrine, Symfony, etc), generating code for this may get a bit tedious. This library aims
to provide easy code generation for:

 * General purpose PHP files and classes
 * Doctrine entities
 * Symfony bundles
 * An alternate implementation for the symfony container builder

Currently, the library is still under development, and if you want to know what's up or would like to help, let me know! You can create issues here, or contact me directly at <EMAIL>.

## But, Doctrine and Symfony already have code generators, why do I need this one? ##

Melp\Cg provides a document-oriented approach to generating and inflecting code. Applying changes to code can easily
be implemented using the provided visitor implementation. This makes both the generation and the use of the
code generator very easy and understandable. The aim is to create a simple yet powerful interface to easily generate but also modify existing code.

## Building code ##

A builder pattern is provided for quick structural setup, for example:

````
<?php

echo (string)
    (new Buffer())->append(
        new Builder()
            ->file()
{'fraction_non_alphanumeric': 0.052486187845303865, 'fraction_numerical': 0.0, 'mean_word_length': 4.248447204968944, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1000119', 'n_tokens_mistral': 608, 'n_tokens_neox': 576, 'n_words': 368}