PHPackages                             kigkonsult/pcgen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kigkonsult/pcgen

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kigkonsult/pcgen
================

PHP Code Generation support package

v1.2(5y ago)3591gpl-3.0PHPPHP &gt;=7.0CI failing

Since Jun 7Pushed 5y ago2 watchersCompare

[ Source](https://github.com/iCalcreator/PcGen)[ Packagist](https://packagist.org/packages/kigkonsult/pcgen)[ Fund](https://paypal.me/kigkonsult)[ RSS](/packages/kigkonsult-pcgen/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

PcGen
=====

[](#pcgen)

###### the PHP Code Generation support package

[](#the-php-code-generation-support-package)

- create PHP class / interface / trait code opt shipped with file docBlock with namespace, use, extends, implements with constuctor and factory methods with constants and properties with opt. getter(+iterator) and setter methods allow insert of (pre-produced, logic) code
- create docBlocks in compliance with [phpdoc](https://phpdoc.org)
- create PHP function/method frame (shell) code with arguments and closure use variables with property(/variable) set code with method return code allow insert of (pre-produced, logic) code
- create code for single or chained function/method invoke(s)
- create define variable property/variable/constant code with PHP primitive value, array, closure or callback
- create code for variable/property value assign from variable/property value (scalar) fixedSourceValue ternary or null coalesce operator expression other PHP expression constant function/method invoke(s)
- create logic code using

    - control structures
    - ternary or null coalesce operator expressions
    - try/catch-blocks
- create code for function/method return of variable/property value (scalar) fixedSourceValue ternary or null coalesce operator expression other PHP expression constant

    - function/method invoke(s)

More info in the PcGen [Summary](docs/Summary.md).

---

###### Misc

[](#misc)

The target PHP version code is, default, the current PHP version but configurable.

Using a PHP reserved name as *name* (ex FQCN/className) will thow an InvalidArgumentException.

You may need to readjust result output code style and indents.

###### Tests

[](#tests)

Tests are executed in `DISPLAY` mode, to alter, update *PHP* const in top of `phpunit.xml`.
Assert PHP 7+ using [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility) and [PHPStan](https://github.com/phpstan/phpstan).

###### Support

[](#support)

For support use [github.com PcGen](https://github.com/iCalcreator/PcGen). Non-emergence support issues are, unless sponsored, fixed in due time.

###### Sponsorship

[](#sponsorship)

Donation using [paypal.me/kigkonsult](https://paypal.me/kigkonsult) are appreciated. For invoice, [please e-mail](mailto:ical@kigkonsult.se).

###### INSTALL

[](#install)

```
composer require kigkonsult/pcgen:dev-master
```

Composer, in your `composer.json`:

```
{
    "require": {
        "kigkonsult/pcgen": "dev-master"
    }
}
```

Otherwise , download and acquire..

```
namespace Kigkonsult\PcGen;
...
include 'pathToSource/Kigkonsult/PcGen/autoload.php';
```

###### License

[](#license)

This project is licensed under the GPLv3 License

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

2

Last Release

1843d ago

PHP version history (2 changes)v1.1.5PHP &gt;=5.6

v1.2PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/880bc63234680337791ded78ebb9a07cbe59101a67e4bf0184ef4a6d5a32e6e2?d=identicon)[kigsf](/maintainers/kigsf)

---

Top Contributors

[![iCalcreator](https://avatars.githubusercontent.com/u/991251?v=4)](https://github.com/iCalcreator "iCalcreator (29 commits)")

---

Tags

phpdoccodedocblockinterfaceclasstraitpropertyfunctionmethodgenerationsupportvariablecreateinit

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kigkonsult-pcgen/health.svg)

```
[![Health](https://phpackages.com/badges/kigkonsult-pcgen/health.svg)](https://phpackages.com/packages/kigkonsult-pcgen)
```

###  Alternatives

[nette/robot-loader

🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.

89955.0M358](/packages/nette-robot-loader)[riimu/kit-phpencoder

Highly customizable alternative to var\_export for PHP code generation

748.3M35](/packages/riimu-kit-phpencoder)[rybakit/arguments-resolver

ArgumentsResolver allows you to determine the arguments to pass to a function or method.

26111.1k7](/packages/rybakit-arguments-resolver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
