<commit_before>language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1

sudo: false

env:
  matrix:
    - DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test'
    - DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test'
    - DB=sqlite db_dsn='sqlite:///:memory:'

  global:
    - DEFAULT=1

matrix:
  fast_finish: true

  include:
    - php: 7.0
      env: PHPCS=1 DEFAULT=0

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

  - composer install

  - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:"2.*"; fi

  - if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
  - if [[ $DB = 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi

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 -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi

after_success:
  - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi
<commit_msg>Run phpstan checks on travis.<commit_after>language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1

sudo: false

env:
  matrix:
    - DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test'
    - DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test'
    - DB=sqlite db_dsn='sqlite:///:memory:'

  global:
    - DEFAULT=1

matrix:
  fast_finish: true

  include:
    - 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

  - composer install

  - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:"2.*"; fi
  - if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan; fi

  - if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
  - if [[ $DB = 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi

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 -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
  - if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse -l 1 src; fi

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

{'fraction_non_alphanumeric': 0.17366628830874006, 'fraction_numerical': 0.033673855467272036, 'mean_word_length': 2.865497076023392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7001517', 'n_tokens_mistral': 1151, 'n_tokens_neox': 1068, 'n_words': 247}