Skip to content

Commit

Permalink
Update linting setup and fix any new lint errors (#1742)
Browse files Browse the repository at this point in the history
* Update phpcs
* Add ruleset for src/
* Fix linting on src/
* Lint tests
* Make tests PSR4 compliant
* Split Kohana bootstrap out of Feature Context so we can ignore it for CS
* Fix spec ruleset
* Fix linting on migrations
  • Loading branch information
rjmackay authored May 16, 2017
1 parent 9ff5c5b commit 341ec70
Show file tree
Hide file tree
Showing 74 changed files with 499 additions and 503 deletions.
9 changes: 5 additions & 4 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ default:
paths:
- %paths.base%/tests/integration
contexts:
- FeatureContext
- RestContext:
- Tests\Integration\Bootstrap\KohanaContext
- Tests\Integration\Bootstrap\FeatureContext
- Tests\Integration\Bootstrap\RestContext:
baseUrl: http://localhost:8000
# proxyUrl: localhost:8888
- PHPUnitFixtureContext
- MinkExtendedContext
- Tests\Integration\Bootstrap\PHPUnitFixtureContext
- Tests\Integration\Bootstrap\MinkExtendedContext
filters:
tags: ~@dataproviders
extensions:
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
"phpunit/phpunit": "^5.7",
"phpunit/dbunit": "~1.4",
"phpspec/phpspec": "~3.0",
"squizlabs/php_codesniffer": "1.5.*",
"heroku/heroku-buildpack-php": "dev-master",
"behat/behat": "^3.3",
"behat/mink-extension": "^2.2",
"behat/mink-goutte-driver": "^1.2",
"satooshi/php-coveralls": "^2.0@dev",
"leanphp/phpspec-code-coverage": "~3.1",
"laravel/homestead": "^5.2"
"laravel/homestead": "^5.2",
"squizlabs/php_codesniffer": "~3.0"
},
"config": {
"bin-dir": "bin/",
Expand All @@ -78,9 +78,10 @@
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
"psr-4": {
"Tests\\Unit\\": "tests/unit",
"Tests\\Integration\\Bootstrap\\": "tests/integration/bootstrap"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -89,7 +90,7 @@
"@migrate"
],
"lint" : [
"phpcs --ignore=vendor/*,application/*,modules/*,plugins/*,httpdocs/*,tests/*,migrations/*,bin/* --standard=PSR2 --tab-width=4 ./",
"phpcs --ignore=vendor/*,application/*,modules/*,plugins/*,httpdocs/*,tests/spec/*,migrations/*,bin/* --standard=src/ruleset.xml --tab-width=4 ./",
"phpcs --standard=tests/spec/ruleset.xml --tab-width=4 ./tests/spec/",
"phpcs --standard=migrations/ruleset.xml --tab-width=4 ./migrations/"
],
Expand Down
Loading

0 comments on commit 341ec70

Please sign in to comment.