rustam / php-project-lvl2
hexlet php-package
v1.0
2020-06-22 17:24 UTC
Requires
- docopt/docopt: ^1.0
- funct/funct: ^1.5
- symfony/yaml: ^5.1
Requires (Dev)
- phpunit/phpunit: ^9.1
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2025-04-16 00:22:29 UTC
README
Gendiff
This is a tutorial project that implements a file comparison utility.
To install via composer, enter in the console:
composer global require rustam/php-project-lvl2
Type for help.
gendiff -h
Generate diffUsage: gendiff (-h|--help) gendiff (-v|--version) gendiff [--format <fmt>] <firstFile> <secondFile>
Options: -h --help Show this screen -v --version Show version --format <fmt> Report format [default: pretty]
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
The utility is also capable of comparing files with a nested structure.
The utility is capable of displaying the result in three versions
-Plian -Pretty [default] -JSONJSON:
Plain:
Supported file formats for comparison: .json .yaml .yml