11# PHP Json Schema Validator
22
33[ ![ Release] ( https://img.shields.io/github/v/release/ixnode/php-json-schema-validator )] ( https://github.com/ixnode/php-json-schema-validator/releases )
4- [ ![ PHP] ( https://img.shields.io/badge/PHP-^8.0-777bb3.svg?logo=php&logoColor=white&labelColor=555555&style=flat )] ( https://www.php.net/supported-versions.php )
4+ [ ![ ] ( https://img.shields.io/github/release-date/ixnode/php-json-schema-validator )] ( https://github.com/ixnode/php-json-schema-validator/releases )
5+ ![ ] ( https://img.shields.io/github/repo-size/ixnode/php-json-schema-validator.svg )
6+ [ ![ PHP] ( https://img.shields.io/badge/PHP-^8.2-777bb3.svg?logo=php&logoColor=white&labelColor=555555&style=flat )] ( https://www.php.net/supported-versions.php )
57[ ![ PHPStan] ( https://img.shields.io/badge/PHPStan-Level%20Max-brightgreen.svg?style=flat )] ( https://phpstan.org/user-guide/rule-levels )
8+ [ ![ PHPUnit] ( https://img.shields.io/badge/PHPUnit-Unit%20Tests-6b9bd2.svg?style=flat )] ( https://phpunit.de )
69[ ![ PHPCS] ( https://img.shields.io/badge/PHPCS-PSR12-brightgreen.svg?style=flat )] ( https://www.php-fig.org/psr/psr-12/ )
10+ [ ![ PHPMD] ( https://img.shields.io/badge/PHPMD-ALL-364a83.svg?style=flat )] ( https://github.com/phpmd/phpmd )
11+ [ ![ Rector - Instant Upgrades and Automated Refactoring] ( https://img.shields.io/badge/Rector-PHP%208.2-73a165.svg?style=flat )] ( https://github.com/rectorphp/rector )
712[ ![ LICENSE] ( https://img.shields.io/github/license/ixnode/php-json-schema-validator )] ( https://github.com/ixnode/php-json-schema-validator/blob/master/LICENSE )
813
914> An easy-to-use PHP Json Schema Validator on top of [ opis/json-schema] ( https://github.com/opis/json-schema ) .
1015
11- ## Installation
12-
13- ``` bash
14- composer require ixnode/php-json-schema-validator
15- ```
16-
17- ``` bash
18- vendor/bin/php-json-schema-validator -V
19- ```
20-
21- ``` bash
22- php-json-schema-validator 0.1.0 (12-31-2022 15:51:08) - Björn Hempel < bjoern@hempel.li>
23- ```
24-
25- ## Usage
16+ ## 1. Usage
2617
2718``` php
2819use Ixnode\PhpJsonSchemaValidator\Validator;
@@ -38,9 +29,24 @@ $schema = [
3829$validator = new Validator(new Json($data), new Json($schema));
3930
4031$valid = $validator->validate();
32+ // (bool) true
33+ ```
34+
35+ ## 2. Installation
36+
37+ ``` bash
38+ composer require ixnode/php-json-schema-validator
39+ ```
40+
41+ ``` bash
42+ vendor/bin/php-json-schema-validator -V
43+ ```
44+
45+ ``` bash
46+ php-json-schema-validator 0.1.0 (12-31-2022 15:51:08) - Björn Hempel < bjoern@hempel.li>
4147```
4248
43- ## Development
49+ ## 3. Library development
4450
4551``` bash
4652git clone git@github.com:ixnode/php-json-schema-validator.git && cd php-json-schema-validator
@@ -54,6 +60,6 @@ composer install
5460composer test
5561```
5662
57- ## License
63+ ## 4. License
5864
5965This tool is licensed under the MIT License - see the [ LICENSE] ( /LICENSE ) file for details
0 commit comments