Skip to content

Commit

Permalink
Merge pull request #46 from phil-davis/bump-php-stan
Browse files Browse the repository at this point in the history
Bump phpstan to 0.12
  • Loading branch information
phil-davis committed Jan 26, 2020
2 parents 2d45f51 + e2651d4 commit 7bc19fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
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

0 comments on commit 7bc19fe

Please sign in to comment.