Skip to content

Commit 51d0cec

Browse files
committed
Add make file
1 parent fbc52c4 commit 51d0cec

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.PHONY: install-phive
2+
install-phive:
3+
wget -O tools/phive.phar https://phar.io/releases/phive.phar; \
4+
wget -O tools/phive.phar.asc https://phar.io/releases/phive.phar.asc; \
5+
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79; \
6+
gpg --verify tools/phive.phar.asc tools/phive.phar; \
7+
chmod +x tools/phive.phar
8+
9+
.PHONY: setup
10+
setup: install-phive
11+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/phive.phar install --force-accept-unsigned
12+
13+
.PHONY: phpcs
14+
phpcs:
15+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:master -d memory_limit=1024M
16+
17+
.PHONY: phpstan
18+
phpstan:
19+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpstan-ga:master analyse src --no-progress --level max --configuration phpstan.neon
20+
21+
.PHONY: test
22+
test:
23+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/phpunit
24+
25+
.PHONY: pre-commit-test
26+
pre-commit-test: test phpcs phpstan
27+

phpstan.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
parameters:
2-
ignoreErrors:
3-
-
4-
message: '#Parameter \#1 \$types of class phpDocumentor\\Reflection\\Types\\Compound constructor expects array<phpDocumentor\\Reflection\\Type>, array<int, string> given\.#'
5-
path: %currentWorkingDirectory%/tests/unit/Types/CompoundTest.php
6-
- message: '#Parameter \#2 \$fileContents of method phpDocumentor\\Reflection\\Types\\ContextFactory::createForNamespace\(\) expects string, string|false given\.#'
7-
path: %currentWorkingDirectory%/tests/unit/Types/ContextFactoryTest.php

0 commit comments

Comments
 (0)