Skip to content

Commit

Permalink
Add phpstan check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 1, 2017
1 parent 7d95eed commit 6ccbe01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ matrix:
- php: 7.0
env: PHPCS=1 DEFAULT=0

- php: 7.0
env: PHPSTAN=1 DEFAULT=0

before_script:
- if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then phpenv config-rm xdebug.ini; fi

Expand All @@ -39,8 +42,11 @@ before_script:
script:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.0 ]]; then vendor/bin/phpunit; fi
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi

- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi

- if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.8 && vendor/bin/phpstan analyse -l 4 src; fi

after_success:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi

Expand Down
2 changes: 1 addition & 1 deletion src/Model/Behavior/SequenceBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function setOrder(array $records)
$table->removeBehavior('Sequence');

$return = $table->connection()->transactional(
function ($connection) use ($table, $records, $config) {
function ($connection) use ($table, $records) {
$order = $this->_config['start'];
$field = $this->_config['order'];

Expand Down

0 comments on commit 6ccbe01

Please sign in to comment.