<commit_before>sudo: false

language: php

php:
    - '5.5'
    - '5.6'
    - '7.0'
    - hhvm

env:
    global:
        secure: PSAHJ0UucF1dAg0zyy5hzLdXtf2QqdNALFMBEtt6qlmr6NLjtD3TLB3g8gerzZNdAH5gCmD4KdIRssU2n91KO1MvsxZymyR3u9b92Xm60oRRIa62cPR9BeDrDxm9y6dR+7rNAkNz3JtBQP1TIO3fw7N1kyqFQu4B3a0bCHsk1e55OUCZ61VySMQWH2zDdKgjv7e/fueU3R9ns/6/gqN9BeIM5lasXgmAkcngIEZpbuv6GcBjEr9NbJAwo3RBnT1ulpSVbbJpZnpwN+W5vDZ5HGBK+Aw6ZQdUYVrcp+PAHELjEm6zMvd4kvWI//xky3iawESo5bK//aBWQfDeSOCegxBQ5TU/BBcRq/FRpYF/TqSwZOP9Cz0UJ4pkqPTQQlwlJXz8Peg3Poh1R/a3TIp3v8IvM3/Dd/llgJrdl8T38bsZN+pyNAfcrzxyWbpHNjrc5b411YzPuU9MPNa3Ar0263+HKFGFFBBIsNzpbOoWx8Sdua6oyVNEvIZE7x0JBQeNQqJiZFVEw9UPtCVsU5tae97DS7iVDR9PxwvjuU2xZcgAbFlS+nwMOzNjNuj8ISFyfkfPYZ7SXtf2oVHPKS8WIBNRK4v8l0oJjYIWMKiMzn6DOmaStYPoCf22HZ2c9ZSDAWS3umFDbUBQ8xx7/QZBs83DD7Jf7aLbxrYEgJQonKI=

matrix:
    fast_finish: true
    allow_failures:
        - php: hhvm

cache:
    directories:
        - node_modules
        - $HOME/.composer/cache/files

before_install:
    - rm -rf "$HOME/.nvm"
    - git clone https://github.com/creationix/nvm.git "$HOME/.nvm"
    - source "$HOME/.nvm/nvm.sh"
    - nvm install node
    - npm config set progress false
    - npm install -g npm
    - composer self-update
    - composer global require --prefer-source --no-interaction hirak/prestissimo

install:
    - npm install
    - composer install --prefer-source --no-interaction

script:
    - npm run-script lint-ci
    - composer test-ci

after_success:
    - vendor/bin/coveralls --verbose
    - |
        if [ "$TRAVIS_PHP_VERSION" = '5.6' ] && [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" = 'false' ]; then
            BUILD_PATH="$(pwd)"
            REPOSITORY=${REPOSITORY:-"https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git"}
            BRANCH=${BRANCH:-"gh-pages"}
            APIGEN_BUILD_PATH=${APIGEN_BUILD_PATH:-"/tmp/apigen"}
            GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-"Travis CI"}
            GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-"<EMAIL>"}
            git clone --branch "$BRANCH" --depth 1 "$REPOSITORY" "$APIGEN_BUILD_PATH"
            yes | vendor/bin/apigen generate -d "$APIGEN_BUILD_PATH"
            cd "$APIGEN_BUILD_PATH" || exit 1
            git config user.name "$GIT_AUTHOR_NAME"
            git config user.email "$GIT_AUTHOR_EMAIL"
            git add -A
            if $APIGEN; then git commit -m 'docs: generate API documentation'
            if $APIGEN; then git push origin "$BRANCH"
            if $APIGEN; then cd "$BUILD_PATH"
        fi

notifications:
    email: false

    slack:
        on_pull_requests: false
        on_start: never
        on_success: never
        on_failure: change
        rooms:
            - secure: r4mHUQZnWy3o8f9J7GS/kmgrt1LZ9xtFQPG+O+eoEsgt1yBgoZZk+39JweKMmM3GY+ukBA34TbKVF9RkxpYlLV9j82fbp93oD5KtiWwShM7NrGZb4MRcGHZga/U9FgqHjRyrzZ5XPr4fi7H2+jyKIgTLqRMYjTto5lRcTU8RkNubZijwxR30Y27TwWG36OkasqRr/ye3bDpvxQPvCl+i5vyTN5vP+HzmzAd+2PIXi/sT7AkqeAFkbgjb1zBnstIUK8urIpYpiVXpi+ihQItC7q00fkzb5V+MGDVdgGU/nUiZ2nNfpn9dr+XL/A7hr1Hy2BjCWGiwDfrFDPFcxfVme/ySGnEhxhl9ZkuHPUyGMhzchszLQE/3RwSqygBx/4s8L4ODSW3TYHooyS9Y8kmTpYzqvBJnAXwg4J8nmAb2UMbQ5KFoIEGZDjIq/u34u7+2Qd9ISbbx5jNYarVIdG+EQnLg3rfTIbud9csE/VYQMEd6uRj77YaK92UXpekLKtsVsWKp8duO1mAiJ3s/VHlCBeZWjdh2QvbfIWQ97Cf7DcvQIAlRlhjkQZN5MXdwSBAilr5fbnr/XKj/fKamEPg1yphXk9qUEazAat52zlwwm5sD4W5/vm94ckZrqQaxeMhc/wwdJzPqCpJlbB53z5MKh8UhyiJ80rcT1KtHqtXeVjg=<commit_msg>chore(Travis): fix build error because of missing `fi`<commit_after>sudo: false

language: php

php:
    - '5.5'
    - '5.6'
    - '7.0'
    - hhvm

env:
    global:
        secure: <KEY>

matrix:
    fast_finish: true
    allow_failures:
        - php: hhvm

cache:
    directories:
        - node_modules
        - $HOME/.composer/cache/files

before_install:
    - rm -rf "$HOME/.nvm"
    - git clone https://github.com/creationix/nvm.git "$HOME/.nvm"
    - source "$HOME/.nvm/nvm.sh"
    - nvm install node
    - npm config set progress false
    - npm install -g npm
    - composer self-update
    - composer global require --prefer-source --no-interaction hirak/prestissimo

install:
    - npm install
    - composer install --prefer-source --no-interaction

script:
    - npm run-script lint-ci
    - composer test-ci

after_success:
    - vendor/bin/coveralls --verbose
    - |
        if [ "$TRAVIS_PHP_VERSION" = '5.6' ] && [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" = 'false' ]; then
            BUILD_PATH="$(pwd)"
            REPOSITORY=${REPOSITORY:-"https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git"}
            BRANCH=${BRANCH:-"gh-pages"}
            APIGEN_BUILD_PATH=${APIGEN_BUILD_PATH:-"/tmp/apigen"}
            GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-"Travis CI"}
            GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-"<EMAIL>"}
            git clone --branch "$BRANCH" --depth 1 "$REPOSITORY" "$APIGEN_BUILD_PATH"
            yes | vendor/bin/apigen generate -d "$APIGEN_BUILD_PATH"
            cd "$APIGEN_BUILD_PATH" || exit 1
            git config user.name "$GIT_AUTHOR_NAME"
            git config user.email "$GIT_AUTHOR_EMAIL"
            git add -A
            if $APIGEN; then git commit -m 'docs: generate API documentation'; fi
            if $APIGEN; then git push origin "$BRANCH"; fi
            if $APIGEN; then cd "$BUILD_PATH"; fi
        fi

notifications:
    email: false

    slack:
        on_pull_requests: false
        on_start: never
        on_success: never
        on_failure: change
        rooms:
            - secure: <KEY>
{'fraction_non_alphanumeric': 0.10420841683366733, 'fraction_numerical': 0.04263071597740936, 'mean_word_length': 3.01609363569861, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5230825', 'n_tokens_mistral': 2560, 'n_tokens_neox': 2428, 'n_words': 309}