Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump phpstan to 0.12 #46

Merged
merged 2 commits into from
Jan 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
vendor/
composer.lock

# Composer binaries
bin/phpunit
bin/phpstan
bin/phpstan.phar
bin/php-cs-fixer

# Tests
tests/cov/

Expand All @@ -11,5 +17,8 @@ bin
# Vim
.*.swp

# IDEs
/.idea

# development stuff
.php_cs.cache
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ matrix:
fast_finish: true

install:
- if [ $RUN_PHPSTAN == "TRUE" ]; then wget https://github.com/phpstan/phpstan/releases/download/0.10.3/phpstan.phar; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer require --dev phpstan/phpstan:^0.12; fi

before_script:
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer install

script:
- if [ $RUN_PHPSTAN == "FALSE" ]; then ./bin/phpunit --configuration tests/phpunit.xml.dist --coverage-clover=coverage.xml; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then php phpstan.phar analyse -c phpstan.neon lib; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then php ./bin/phpstan analyse -c phpstan.neon lib; fi

after_success:
- bash <(curl -s https://codecov.io/bash)
8 changes: 4 additions & 4 deletions lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function normalize(string $uri): string
*
* @param string $uri
*
* @return array
* @return array<string, string>
*
* @throws InvalidUriException
*/
Expand Down Expand Up @@ -225,7 +225,7 @@ function ($matches) {
* This function takes the components returned from PHP's parse_url, and uses
* it to generate a new uri.
*
* @param array $parts
* @param array<string, string> $parts
*
* @return string
*/
Expand Down Expand Up @@ -283,7 +283,7 @@ function build(array $parts): string
*
* @param string $path
*
* @return array
* @return array<int, mixed>
*/
function split(string $path): array
{
Expand All @@ -307,7 +307,7 @@ function split(string $path): array
*
* @param string $uri
*
* @return array
* @return array<string, mixed>
*
* @throws InvalidUriException
*/
Expand Down