Skip to content

Commit

Permalink
Merge af971c2 into 40e75df
Browse files Browse the repository at this point in the history
  • Loading branch information
gongo committed May 13, 2024
2 parents 40e75df + af971c2 commit 6868230
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,34 @@ jobs:
- 8.1
- 8.2
- 8.3
include:
- php-version: 5.4
unrun-phpstan: true
- php-version: 5.5
unrun-phpstan: true
- php-version: 5.6
unrun-phpstan: true
- php-version: 7.0
unrun-phpstan: true
- php-version: 7.1
unrun-phpstan: true

steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2

- name: Setup PHP (with composer)
uses: shivammathur/setup-php@v2
if: ${{ matrix.unrun-phpstan }}
with:
php-version: ${{ matrix.php-version }}
tools: composer
- name: Setup PHP (with composer, phpstan)
if: ${{ ! matrix.unrun-phpstan }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer, phpstan

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand All @@ -55,3 +76,6 @@ jobs:
# see: https://github.com/php-coveralls/php-coveralls/blob/v2.6.0/CHANGELOG.md
[[ -f vendor/bin/php-coveralls ]] && COVERALLS_PATH=vendor/bin/php-coveralls || COVERALLS_PATH=vendor/bin/coveralls
$COVERALLS_PATH
- name: Run PHPStan
if: ${{ ! matrix.unrun-phpstan }}
run: phpstan analyse -l 9 src
8 changes: 5 additions & 3 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,17 @@ private function injectEGPCSToGlobal()
*/
protected function getInjectVariables()
{
return str_split(strtolower(ini_get('variables_order')));
return str_split(
strtolower(ini_get('variables_order')) // @phpstan-ignore argument.type
);
}

/**
* Recursively applies `addslashes` to each element of the array recursive.
*
* This method is **bang** .
*
* @param string[] $theVariables
* @param mixed[] $theVariables
* @return void
*/
private function addSlashesRecursive(&$theVariables)
Expand All @@ -134,7 +136,7 @@ function (&$value) {
}

/**
* @param string[] $theVariables
* @param mixed[] $theVariables
* @return void
*/
protected function injectToGlobal(array $theVariables)
Expand Down
1 change: 1 addition & 0 deletions src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function pollute()
}

/**
* @param mixed[] $theVariables
* @return void
*/
protected function injectToGlobal(array $theVariables)
Expand Down

0 comments on commit 6868230

Please sign in to comment.