PHPackages                             rustam/php-project-lvl2 - 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. rustam/php-project-lvl2

ActiveLibrary

rustam/php-project-lvl2
=======================

hexlet php-package

v1.0(5y ago)02[1 PRs](https://github.com/Rustam-Amirov/php-project-lvl2/pulls)MITPHPCI passing

Since Jun 22Pushed 4w ago1 watchersCompare

[ Source](https://github.com/Rustam-Amirov/php-project-lvl2)[ Packagist](https://packagist.org/packages/rustam/php-project-lvl2)[ RSS](/packages/rustam-php-project-lvl2/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

[![](https://github.com/Rustam-Amirov/php-project-lvl2/workflows/CI/badge.svg?branch=master)](https://github.com/Rustam-Amirov/php-project-lvl2/workflows/CI/badge.svg?branch=master)[![Maintainability](https://camo.githubusercontent.com/46587e17d9acf9e423e3fde7581de69655e57f2f475967af04a1e7d707d4a621/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62623264363064663061383565323937343430352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/Rustam-Amirov/php-project-lvl2/maintainability)[![Test Coverage](https://camo.githubusercontent.com/e86e262a6d6608aab1a75337ecb36e6e141a675a1d687032a88e5c34a93d3d2b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62623264363064663061383565323937343430352f746573745f636f766572616765)](https://codeclimate.com/github/Rustam-Amirov/php-project-lvl2/test_coverage)

Gendiff
=======

[](#gendiff)

This is a tutorial project that implements a file comparison utility.
---------------------------------------------------------------------

[](#this-is-a-tutorial-project-that-implements-a-file-comparison-utility)

### To install via composer, enter in the console:

[](#to-install-via-composer-enter-in-the-console)

```
composer global require rustam/php-project-lvl2
```

### Type for help.

[](#type-for-help)

```
gendiff -h
```

```
Generate diff
Usage:
gendiff (-h|--help)
gendiff (-v|--version)
gendiff [--format ]
Options:
-h --help                     Show this screen
-v --version                  Show version
--format                 Report format [default: pretty]

```

### Also this utility can be used as a function. Example:

[](#also-this-utility-can-be-used-as-a-function-example)

```
genDiff('before.json', 'after.json', 'plain);
```

before.json after.json paths to files. format - output format.

You can use absolute and relative file paths to compare files

[![](https://camo.githubusercontent.com/62410ecc8858f6623bc9fa2c43016668acb93eb948e387c51a74ba890a1b842c/68747470733a2f2f61736369696e656d612e6f72672f612f3333343532362e706e67)](https://asciinema.org/a/334526?autoplay=1)

The utility is also capable of comparing files with a nested structure.

[![](https://camo.githubusercontent.com/b51007a3c224bacd1e812cd016c722f5bea531effe240750d917b6614c6e281a/68747470733a2f2f61736369696e656d612e6f72672f612f5139424245707875706b38616872684d7155653333476348592e706e67)](https://asciinema.org/a/Q9BBEpxupk8ahrhMqUe33GcHY)The utility is capable of displaying the result in three versions

-Plian

-Pretty [default]

-JSON

JSON:

[![](https://camo.githubusercontent.com/c4189882b5fe4780726aa330a89f3cecafdd2c67e79f95bf0759b7a15ab09fa8/68747470733a2f2f61736369696e656d612e6f72672f612f31537453623268433655686a6d506657424d6b4551773746352e737667)](https://asciinema.org/a/1StSb2hC6UhjmPfWBMkEQw7F5)Plain:

[![](https://camo.githubusercontent.com/496cf549e66ad0bd1f527537dd89cbd83f0b442f32f11ce7d2fe9ac02110aa85/68747470733a2f2f61736369696e656d612e6f72672f612f7558703553386b394f567754727a394234525148506961557a2e737667)](https://asciinema.org/a/uXp5S8k9OVwTrz9B4RQHPiaUz)Supported file formats for comparison: .json .yaml .yml

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance62

Regular maintenance activity

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2155d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/41517?v=4)[Rustam Mamat](/maintainers/Rustam)[@rustam](https://github.com/rustam)

---

Top Contributors

[![Rustam-Amirov](https://avatars.githubusercontent.com/u/42617216?v=4)](https://github.com/Rustam-Amirov "Rustam-Amirov (42 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rustam-php-project-lvl2/health.svg)

```
[![Health](https://phpackages.com/badges/rustam-php-project-lvl2/health.svg)](https://phpackages.com/packages/rustam-php-project-lvl2)
```

PHPackages © 2026

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