Skip to content

Commit

Permalink
Add a dev dependency on infection
Browse files Browse the repository at this point in the history
  • Loading branch information
Mopolo committed Nov 26, 2020
1 parent c9164b8 commit 7eda323
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = LF

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

[*.yml]
indent_size = 2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs
phpunit.xml
psalm.xml
vendor
infection.log
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ help:
@echo " test to perform tests."
@echo " coverage to perform tests with code coverage."
@echo " phpstan to run phpstan"
@echo " infection to run infection"

install:
composer install
Expand All @@ -16,3 +17,8 @@ coverage:

phpstan:
php vendor/bin/phpstan analyse

INFECTION_THREADS = $(shell sysctl -n hw.ncpu)

infection:
php vendor/bin/infection --threads=$(INFECTION_THREADS)
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"require-dev": {
"phpunit/phpunit": "^7.5",
"phpstan/phpstan": "0.12.56"
"phpstan/phpstan": "0.12.56",
"infection/infection": "^0.20.2"
}
}
13 changes: 13 additions & 0 deletions infection.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"source": {
"directories": [
"src"
]
},
"logs": {
"text": "infection.log"
},
"mutators": {
"@default": true
}
}

0 comments on commit 7eda323

Please sign in to comment.