Skip to content

Commit 2066dd4

Browse files
committed
Align with QuickCheck
1 parent 153f9b6 commit 2066dd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2940
-840
lines changed

Diff for: .env.test

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APP_ENV=test

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
/build/
22
/composer.lock
3+
/.env
34
/.phpcheck/
5+
/.php_cs.cache
46
/php_errors.log
7+
/phpcheck.log
58
/.phpunit.result.cache
9+
/report/
610
/vendor/
711
/.vscode/

Diff for: .travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@ env:
1919
git:
2020
depth: 3
2121

22+
before_install:
23+
- pecl install ds
24+
2225
install:
2326
- if [[ "$DEPENDENCIES" = "high" ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS; fi
2427
- if [[ "$DEPENDENCIES" = "low" ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi
2528

29+
before_script:
30+
- phpenv config-rm xdebug.ini
31+
2632
script:
33+
- cp .env.test .env
34+
- phpunit
2735
- bin/phpcheck
2836

2937
cache:

Diff for: Makefile

+32-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1+
test: phpcheck-no-defects phpunit
2+
3+
watch:
4+
while inotifywait -e close_write -r composer.* ./src ./checks ./functions ./tests; do make phpunit phpcheck; done
5+
6+
watch-playground:
7+
while inotifywait -e close_write -r composer.* ./src ./checks ./functions ./playground ./tests; do php playground/test.php; done
8+
19
phpcheck:
210
@phpcheck
311

412
phpcheck-coverage-html:
5-
@phpcheck --coverage-html build/coverage
6-
@xdg-open build/coverage/index.html
13+
sudo phpenmod xdebug
14+
@phpcheck --coverage-html report/phpcheck-coverage
15+
sudo phpdismod xdebug
16+
@xdg-open report/phpcheck-coverage/index.html
717

818
phpcheck-coverage-console:
19+
sudo phpenmod xdebug
920
@phpcheck --coverage-text
21+
sudo phpdismod xdebug
1022

1123
phpcheck-coverage-text:
12-
@phpcheck --coverage-text build/coverage.txt
24+
sudo phpenmod xdebug
25+
@phpcheck --coverage-text report/phpcheck-coverage.txt
26+
sudo phpdismod xdebug
1327

1428
phpcheck-log-junit:
1529
@phpcheck --log-junit build/phpcheck.xml
@@ -28,3 +42,18 @@ phpmd:
2842

2943
phpstan:
3044
@phpstan analyse src checks --level 5
45+
46+
phpunit:
47+
@phpunit
48+
49+
phpunit-coverage:
50+
sudo phpenmod xdebug
51+
@phpunit --coverage-html report/phpunit-coverage
52+
sudo phpdismod xdebug
53+
@xdg-open report/phpunit-coverage/index.html
54+
55+
profile:
56+
sudo phpenmod xdebug
57+
# @php -d xdebug.profiler_enable=1 `which phpunit`
58+
@php -d xdebug.profiler_enable=1 `which phpcheck`
59+
sudo phpdismod xdebug

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Annotate your check method parameters to control the arguments provided to the m
3838

3939
Parameter tags (use them in the description of a parameter, usually the end):
4040

41-
* `{@gen name}` or `{@gen name:params}` where `name` is the name of the generator and `params` is a JSON encoded array of arguments passed to the generator.
41+
* `{@gen #name}` or `{@gen #name param1 param2}` where `#name` is the name of a generator below and `param1` and `param2` are JSON encoded values which become arguments passed to the generator.
4242

4343
Method tags:
4444

@@ -54,7 +54,7 @@ Below is the list of generators that are currently available:
5454
* `characters($minChar, $maxChar)`
5555
* `choose(array $arr)`
5656
* `faker(...$args)`
57-
* `floats(float $min, float $max, Generator $decimals = null)`
57+
* `floats(float $min, float $max)`
5858
* `integers(int $min = PHP_INT_MIN, int $max = PHP_INT_MAX)`
5959
* `intervals(array $include = [[PHP_INT_MIN, PHP_INT_MAX]], array $exclude=[])`
6060
* `listOf(Generator $values = null, Generator $sizes = null)`

0 commit comments

Comments
 (0)