Skip to content

Commit

Permalink
fix return type of method write(), update .gitattributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Mitterhauser committed Apr 3, 2024
1 parent 4151306 commit 3b145f7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.gitattributes export-ignore
.gitignore export-ignore
.github/ export-ignore
vendor/ export-ignore
composer.* export-ignore
phpstan.neon export-ignore
README.* export-ignore
LICENSE export-ignore
46 changes: 26 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,44 @@ on:
jobs:
# Composer config validation
composer:
name: Composer config validation
runs-on: ubuntu-latest
name: "Composer config validation"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Validate composer.json
run: composer validate --strict
- uses: "actions/checkout@v3"
- name: "Validate composer.json"
run: "composer validate --strict"

# PHP syntax validation
php:
name: PHP syntax validation
runs-on: ubuntu-latest
name: "PHP syntax validation"
runs-on: "ubuntu-latest"
strategy:
matrix:
php_version: [ 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3
- name: Check PHP syntax of config/phinx.php
run: php -l Lib/
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php_version }}"
- name: "Check PHP syntax of config/phinx.php"
run: "php -l Lib/"

# phpstan for several php versions
phpstan:
runs-on: ubuntu-latest
runs-on: "ubuntu-latest"
strategy:
matrix:
php_version: [ 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
- uses: "actions/checkout@v3"
- uses: "php-actions/composer@v6"
with:
php_version: ${{ matrix.php_version }}
php_extensions: redis intl
php_version: "${{ matrix.php_version }}"
php_extensions: "redis intl"

- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
- name: "PHPStan Static Analysis"
uses: "php-actions/phpstan@v3"
with:
php_version: ${{ matrix.php_version }}
configuration: phpstan.neon
path: Lib/
php_version: "${{ matrix.php_version }}"
configuration: "phpstan.neon"
path: "Lib/"
4 changes: 2 additions & 2 deletions Lib/Cache/Engine/PredisEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ protected function _connect(): bool
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param int $duration How long to cache the data, in seconds
* @return bool True if the data was successfully cached, false on failure
* @return bool|string True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration): bool
public function write($key, $value, $duration)
{
if (!is_int($value)) {
$value = serialize($value);
Expand Down

0 comments on commit 3b145f7

Please sign in to comment.