valentina-vasileva/php-project-lvl2

There is no license information available for the latest version (1.4.1) of this package.

1.4.1 2021-01-11 14:43 UTC

This package is auto-updated.

Last update: 2025-05-12 00:14:34 UTC


README

Tests and linter status:

GENDIFF

A PHP package which shows difference (stylish, plain or json format) between two files (yaml, json).

Installation

Via Composer

As a CLI:

$ composer global require valentina-vasileva/php-project-lvl2

As a library to your project:

$ composer require valentina-vasileva/php-project-lvl2

Usage

As a CLI:

$ gendiff [--format <fmt>] <path_to_file1> <path_to_file2>

Also you can show yourself a descriptoin of the CLI:

$ gendiff -h
$ gendiff --help

As a library to your project:

use function Differ\Differ\genDiff;

genDiff($filepath1, $filepath2, $formatName = 'stylish');

Examples of using the package

plain *.json files to stylish format:

asciicast

plain *.yaml files to stylish format:

asciicast

complex .json/.yaml files to stylish format:

asciicast asciicast

complex .json/.yaml files to plain format:

asciicast

complex .json/.yaml files to json format:

asciicast