Skip to content

Commit

Permalink
phpmd removed, min PHP version to 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Votruba committed Dec 24, 2014
1 parent 7c3d5e4 commit 0f786a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- hhvm
Expand All @@ -15,12 +16,10 @@ before_script:
# php linter
- vendor/bin/parallel-lint -e php src tests
# php code-sniffer
- vendor/bin/phpcs src tests/ZenifyTests --standard=src/ZenifyCodingStandard/ruleset.xml --ignore=wrong,correct,bootstrap
# php mess-detector
- vendor/bin/phpmd src,tests text src/ZenifyMessDetector/ruleset.xml --exclude "correct*,wrong*"
- vendor/bin/phpcs src tests --standard=src/ZenifyCodingStandard/ruleset.xml --ignore=wrong,correct

script:
- vendor/bin/phpunit --coverage-clover=coverage.clover
- vendor/bin/phpunit

after_script:
# move code coverage
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"name": "zenify/coding-standard",
"description": "Set of rules for PHP_CodeSniffer based on PGS-2 (http://php-fg.com) and Nette CS.",
"description": "Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.",
"license": "MIT",
"authors": [
{ "name": "Tomáš Votruba", "homepage": "http://tomasvotruba.cz" }
{ "name": "Tomáš Votruba", "email": "[email protected]", "homepage": "http://tomasvotruba.cz" }
],
"require": {
"php": ">=5.5",
"squizlabs/php_codesniffer": "~2.0",
"phpmd/phpmd": "~2.1"
"php": ">=5.4",
"squizlabs/php_codesniffer": "~2.1"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "~0.8",
"phpunit/phpunit": "~4.4"
},
"autoload-dev": {
"psr-4": {
"ZenifyTests\\": "tests/ZenifyTests"
"Zenify\\CodingStandard\\Tests\\": "tests"
}
}
}
18 changes: 0 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,3 @@ In case you want to create your own rules, here are some sources to start with:
- [Nice explanatory tutorial](http://blog.mayflower.de/631-Creating-coding-standards-for-PHP_CodeSniffer.html)
- [Overview of default rules with examples](http://edorian.github.io/php-coding-standard-generator/#phpcs)
- [Post on Why to add CS as part of your projects](http://edorian.github.io/2013-03-13-Please-ship-your-own-coding-standard-as-part/)


---


## Other commands

### [PHP Mess Detector](https://github.com/phpmd/phpmd)

Rules are nicely [explained here](http://edorian.github.io/php-coding-standard-generator/#phpmd).

To test `src` folder with `text` output, just run.

```sh
$ vendor/bin/phpmd src text vendor/zenify/coding-standard/src/ZenifyMessDetector/ruleset.xml
```

Or with no options to see documentation.

0 comments on commit 0f786a4

Please sign in to comment.