Skip to content

Commit 32a7a83

Browse files
committed
code coverage badge fix, json-diff update
1 parent bbd19bb commit 32a7a83

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ cache:
1919

2020
# execute any number of scripts before the test run, custom env's are available as variables
2121
before_script:
22+
- ls -la $HOME/.composer/cache
23+
- test -f $HOME/.composer/cache/composer.lock.$(phpenv version-name) && cp $HOME/.composer/cache/composer.lock.$(phpenv version-name) ./composer.lock || echo "No composer.lock cached"
2224
- composer install --dev --no-interaction --prefer-dist
25+
- test -f $HOME/.composer/cache/composer.lock.$(phpenv version-name) || cp ./composer.lock $HOME/.composer/cache/composer.lock.$(phpenv version-name)
2326
- if [[ $(phpenv version-name) =~ 7.2 ]] ; then test -f $HOME/.composer/cache/phpstan.phar || wget https://github.com/phpstan/phpstan/releases/download/0.9.1/phpstan.phar -O $HOME/.composer/cache/phpstan.phar; fi
2427
- if [[ $(phpenv version-name) =~ 7.2 ]] ; then test -f $HOME/.composer/cache/ocular.phar || wget https://scrutinizer-ci.com/ocular.phar -O $HOME/.composer/cache/ocular.phar; fi
2528
- if [[ $(phpenv version-name) =~ 7.2 ]] ; then test -f $HOME/.composer/cache/cctr || wget https://codeclimate.com/downloads/test-reporter/test-reporter-0.1.4-linux-amd64 -O $HOME/.composer/cache/cctr && chmod +x $HOME/.composer/cache/cctr; fi

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
[![Build Status](https://travis-ci.org/swaggest/php-json-schema.svg?branch=master)](https://travis-ci.org/swaggest/php-json-schema)
44
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/swaggest/php-json-schema/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/swaggest/php-json-schema/?branch=master)
55
[![Code Climate](https://codeclimate.com/github/swaggest/php-json-schema/badges/gpa.svg)](https://codeclimate.com/github/swaggest/php-json-schema)
6-
[![Test Coverage](https://codeclimate.com/github/swaggest/php-json-schema/badges/coverage.svg)](https://codeclimate.com/github/swaggest/php-json-schema/coverage)
7-
6+
[![Code Coverage](https://scrutinizer-ci.com/g/swaggest/php-json-schema/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/swaggest/php-json-schema/code-structure/master/code-coverage/src/)
87
High definition PHP structures with JSON-schema based validation.
98

109
Supported schemas:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"require": {
66
"php": ">=5.4",
77
"phplang/scope-exit": "^1.0",
8-
"swaggest/json-diff": "^1.0"
8+
"swaggest/json-diff": "^2.0"
99
},
1010
"require-dev": {
1111
"phpunit/phpunit": "4.8.23",

src/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public function process($data, Context $options, $path = '#', $result = null)
247247
if ((is_object($this->const) && is_object($data))
248248
|| (is_array($this->const) && is_array($data))) {
249249
$diff = new JsonDiff($this->const, $data,
250-
JsonDiff::SKIP_REARRANGE_ARRAY + JsonDiff::STOP_ON_DIFF);
250+
JsonDiff::STOP_ON_DIFF);
251251
if ($diff->getDiffCnt() != 0) {
252252
$this->fail(new ConstException('Const failed'), $path);
253253
}

0 commit comments

Comments
 (0)