Skip to content

Latest commit

 

History

68 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status Maintainability Test Coverage PHP CI GitHub PHP Programming Language

Difference Calculator

Console program "Difference Calculator" that determines the difference between two data structures.

It is a project of PHP courses from the Hexlet educational portal.

Features

  • Support for different input formats: yaml and json.
  • Report generation in the form of plain text, stylish and json.

Requirements

  • PHP 8.0+
  • Composer

Installation

$ git clone https://github.com/kaivladimirv/php-project-48.git

$ cd php-project-48

$ make install

asciicast

Usage

gendiff (-h | --help)
gendiff (-v | --version)
gendiff [--format] < firstFile > < secondFile >

Comparing two flat json files

$ ./bin/gendiff file1.json file2.json

asciicast

Comparing two flat yaml files

$ ./bin/gendiff file1.yaml file2.yaml

asciicast

Comparing two json files with recursive structure

$ ./bin/gendiff file1.json file2.json

asciicast

Comparing two json files with use plain formatter

$ ./bin/gendiff --format plain file1.json file2.json

asciicast

Comparing two files with use json formatter

$ ./bin/gendiff --format json file1.json file2.json

asciicast

License

The Difference Calculator project is licensed for use under the MIT License (MIT). Please see LICENSE for more information.

About

Console program "Difference Calculator" that determines the difference between two data structures.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages