Skip to content
This repository was archived by the owner on May 5, 2019. It is now read-only.

Commit 5567e4e

Browse files
committed
Apply code standards
1 parent 373e853 commit 5567e4e

17 files changed

+243
-306
lines changed

Diff for: Makefile

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11

2-
COMPOSER := $(shell which composer || which composer.phar)
2+
PHPCS_OPTS := -n -p --standard=vendor/jbboehr/coding-standard/JbboehrStandard/ruleset.xml \
3+
--report=full --tab-width=4 --encoding=utf-8 --ignore=tests/Spec/* src tests
4+
5+
cbf: vendor
6+
./vendor/bin/phpcbf $(PHPCS_OPTS)
37

48
clean:
59
rm -rf docs reports
610

7-
composer.phar:
8-
@if [ -z "$(COMPOSER)" ]; then wget https://getcomposer.org/composer.phar; chmod +x composer.phar; fi
9-
@if [ ! -z "$(COMPOSER)" ]; then ln -s $(COMPOSER) composer.phar; fi
10-
1111
coverage: vendor
1212
./vendor/bin/phpunit --coverage-text --coverage-html=reports
1313

14+
cs: vendor
15+
./vendor/bin/phpcs $(PHPCS_OPTS)
16+
1417
docs:
1518
apigen generate
1619

17-
php-cs-fixer: vendor
18-
./vendor/bin/php-cs-fixer fix src --fixers=-braces,-elseif,-parenthesis,-phpdoc_no_access,-phpdoc_no_empty_return,-phpdoc_params,-phpdoc_scalar,-phpdoc_separation,-phpdoc_short_description,-align_double_arrow,-align_equals,-return,long_array_syntax,ordered_use,newline_after_open_tag,concat_with_spaces
19-
20-
test: vendor tests/Spec
20+
phpunit: vendor tests/Spec
2121
./vendor/bin/phpunit
2222

23+
test: cs phpunit
24+
2325
tests/Spec:
2426
php generate-tests.php
2527

26-
vendor: composer.phar
27-
./composer.phar install
28+
vendor:
29+
composer install --optimize-autoloader
2830

29-
.PHONY: clean coverage php-cs-fixer test
31+
.PHONY: cbf clean coverage cs phpunit test
3032

Diff for: composer.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
"php" : ">=5.3.0"
2626
},
2727
"require-dev": {
28-
"fabpot/php-cs-fixer": "~1.8",
28+
"jbboehr/coding-standard": "1.0.*@dev",
2929
"pear/console_table": "~1.2.1",
3030
"phpunit/phpunit": "~4.5",
31-
"scrutinizer/ocular": "~1.1"
31+
"scrutinizer/ocular": "~1.1",
32+
"squizlabs/php_codesniffer": "~2.3.2"
3233
},
3334
"type" : "library"
3435
}

0 commit comments

Comments
 (0)