Skip to content

Rustam-Amirov/php-project-lvl2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintainability Test Coverage

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 diff

Usage: 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]
-JSON

JSON:

Plain:

Supported file formats for comparison: .json .yaml .yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published