PHPackages                             guigralho/afd-generator - 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. guigralho/afd-generator

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

guigralho/afd-generator
=======================

package to generate AFD file

1.1(2y ago)2163MITPHPPHP &gt;=5.6.0

Since Dec 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/guigralho/afd-generator)[ Packagist](https://packagist.org/packages/guigralho/afd-generator)[ Docs](https://github.com/guigralho/afd-generator)[ RSS](/packages/guigralho-afd-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

afd-generator
=============

[](#afd-generator)

[![badge](https://camo.githubusercontent.com/c848116b6f29e6ac43ac2d22a42de4fa717e46a20faa520d9a4d89ac5701d6ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6775696772616c686f2f6166642d67656e657261746f72)](https://camo.githubusercontent.com/c848116b6f29e6ac43ac2d22a42de4fa717e46a20faa520d9a4d89ac5701d6ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6775696772616c686f2f6166642d67656e657261746f72)[![badge](https://camo.githubusercontent.com/b44351ecd5ebbebea960a2e9a928753874a3e82064dd55c07826c77b2f39a758/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6775696772616c686f2f6166642d67656e657261746f72)](https://camo.githubusercontent.com/b44351ecd5ebbebea960a2e9a928753874a3e82064dd55c07826c77b2f39a758/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6775696772616c686f2f6166642d67656e657261746f72)[![badge](https://camo.githubusercontent.com/a9198f056a7332e7d0b518f198234145e4e1058fbb3f3d9f93dd2dcd631dde86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6775696772616c686f2f6166642d67656e657261746f72)](https://camo.githubusercontent.com/a9198f056a7332e7d0b518f198234145e4e1058fbb3f3d9f93dd2dcd631dde86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6775696772616c686f2f6166642d67656e657261746f72)[![badge](https://camo.githubusercontent.com/735ee16bc2ebf3857718d52d492024cba01a372ddafeaa7f7894aad7400425a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6775696772616c686f2f6166642d67656e657261746f72)](https://camo.githubusercontent.com/735ee16bc2ebf3857718d52d492024cba01a372ddafeaa7f7894aad7400425a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6775696772616c686f2f6166642d67656e657261746f72)[![badge](https://camo.githubusercontent.com/3a77419265616582346c7e40f0454c07d0db939f4d2fbda6dbf95c734429d1ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6775696772616c686f2f6166642d67656e657261746f72)](https://camo.githubusercontent.com/3a77419265616582346c7e40f0454c07d0db939f4d2fbda6dbf95c734429d1ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6775696772616c686f2f6166642d67656e657261746f72)[![badge](https://camo.githubusercontent.com/24d75b22520a58b32ae7e3c63e9c1cfb4eb53f372910b490997a58aa75a202d2/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c3f7374796c653d736f6369616c2675726c3d68747470732533412532462532466769746875622e636f6d2532466775696772616c686f2532466166642d67656e657261746f72)](https://camo.githubusercontent.com/24d75b22520a58b32ae7e3c63e9c1cfb4eb53f372910b490997a58aa75a202d2/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c3f7374796c653d736f6369616c2675726c3d68747470732533412532462532466769746875622e636f6d2532466775696772616c686f2532466166642d67656e657261746f72)

package to generate AFD file

Install

```
composer require guigralho/afd-generator

```

To generate a file simply add this code:

```
$AfdGenerator = new GuiGralho\AfdGenerator\AfdGenerator([
  'header' => [
    'docEmpregador' => '00.000.000/0000-00',
    'nomeEmpregador' => 'COMPANY LTDA',
    'numRep' => '00000000000000000',
    'dataInicial' => '2020-12-01',
    'dataFinal' => '2020-12-31',
  ],
  'content' => [
    [
      'dataPonto' => '2020-12-01',
      'horarioPonto' => '09:00',
      'numPis' => '123123123',
    ]
  ]
]);

// This returns a string of AFD file
$AfdGenerator->generate();

// This returns a string of AFD file
$AfdGenerator->download($filename = null);

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~1021 days

Total

2

Last Release

938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/462a0d15971fb6862bd805b6bdacfe4ee450ac66816b583e95b009607069993b?d=identicon)[guigralho](/maintainers/guigralho)

---

Top Contributors

[![guigralho](https://avatars.githubusercontent.com/u/4997341?v=4)](https://github.com/guigralho "guigralho (11 commits)")

---

Tags

AFDgenerate afd

### Embed Badge

![Health badge](/badges/guigralho-afd-generator/health.svg)

```
[![Health](https://phpackages.com/badges/guigralho-afd-generator/health.svg)](https://phpackages.com/packages/guigralho-afd-generator)
```

###  Alternatives

[axelarge/array-tools

Array tools for PHP 5.3

136.3k](/packages/axelarge-array-tools)

PHPackages © 2026

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