PHPackages                             ciebit/legislation - 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. ciebit/legislation

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

ciebit/legislation
==================

Módulo de representação de Leis, Decretos e Portarias

v0.4.1(6y ago)0431[1 PRs](https://github.com/ciebit/legislation/pulls)MITPHPPHP ^7.4CI failing

Since Feb 8Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ciebit/legislation)[ Packagist](https://packagist.org/packages/ciebit/legislation)[ RSS](/packages/ciebit-legislation/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (3)Versions (7)Used By (0)

Legislation
===========

[](#legislation)

Representation of Laws, Decrees, Ordinances and Constitution.

Config Tests
------------

[](#config-tests)

1. Copy file `tests/settings.model.php` to `tests/settings.php`;
2. Edit the `tests/settings.php` file by adding the database settings;
3. Run `composer install`;
4. Run `./vendor/bin/phpunit`;

Example Storage
---------------

[](#example-storage)

```
require __DIR__.'/vendor/autoload.php';

use Ciebit\Legislation\Documents\Factories\Law as LawFactory;
use Ciebit\Legislation\Documents\Storages\Databases\Sql;

$lawFactory = new Factory();
$lawFactory->setTitle('Law 12.345/2020')
    ->setDateTime(new DateTime('2020-02-06'))
    ->setStatus(Status::ACTIVE())
    ->setNumber(12345)
    ->setSlug('law-2020')
    ->setDescription('Defines rules for the construction of public schools.');

$law = $lawFactory->create();

$storage = new Sql(new PDO(/** your settings */));
$id = $storage->store($law);
```

Example Find
------------

[](#example-find)

```
require __DIR__.'/vendor/autoload.php';

use Ciebit\Legislation\Documents\Storages\Databases\Sql;
use Ciebit\Legislation\Documents\Decree;
use Ciebit\Legislation\Documents\Status;

$storage = new Sql(new PDO(/** your settings */));
$documentCollection = $storage
    ->addFilterByType('=', Decree::class)
    ->addFilterByStatus(Status::ACTIVE())
    ->find();

foreach($documentCollection as $decree) {
    echo "{$decree->getTitle()}" . PHP_EOL;
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance53

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Total

5

Last Release

2282d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf44dc5faf5cddbf7cefdd85bd82b62f00c1063f5e48389a2b5f4fee63b0c101?d=identicon)[ciebit](/maintainers/ciebit)

---

Top Contributors

[![johnnysaymon](https://avatars.githubusercontent.com/u/5160587?v=4)](https://github.com/johnnysaymon "johnnysaymon (5 commits)")

---

Tags

decretoslegislaçãoleisportarias

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ciebit-legislation/health.svg)

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

###  Alternatives

[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M14](/packages/sylius-refund-plugin)[seboettg/citeproc-php

Full-featured CSL processor (https://citationstyles.org)

761.2M19](/packages/seboettg-citeproc-php)[timeweb/phpstan-enum

Enum class reflection extension for PHPStan

443.2M21](/packages/timeweb-phpstan-enum)[php-unit-conversion/php-unit-conversion

A fully PSR-4 compatible PHP library for converting between standard units of measure.

681.2M1](/packages/php-unit-conversion-php-unit-conversion)[open-feature/sdk

PHP implementation of the OpenFeature SDK

39514.9k15](/packages/open-feature-sdk)

PHPackages © 2026

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