diff --git a/.github/workflows/composer.yml b/.github/workflows/composer.yml index def0a83..c139997 100644 --- a/.github/workflows/composer.yml +++ b/.github/workflows/composer.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index e2c29d5..23bd209 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: 'Dependency Review' uses: actions/dependency-review-action@v4 \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8c82874..62a38f0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Build Docker Images run: composer ${{ matrix.composer-test }}-build ${{ matrix.php }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 2a00973..260230d 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.head_ref }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5852ba0..d489969 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/phpstan.neon b/phpstan.neon index c61dc67..9a5d05d 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -15,5 +15,3 @@ parameters: # excludePaths: # - */Where*.php # - */*Builder.php - - checkMissingIterableValueType: false diff --git a/src/Traits/Cacheable.php b/src/Traits/Cacheable.php index a0c232b..bf1058e 100644 --- a/src/Traits/Cacheable.php +++ b/src/Traits/Cacheable.php @@ -35,7 +35,7 @@ abstract public function execute(); * @param int|null $ttl * @return mixed */ - public function fetch(int $ttl = null) + public function fetch(?int $ttl = null) { return Cache::remember($this->cacheKey(), $this->getTTL($ttl), function () { return $this->execute(); @@ -51,7 +51,7 @@ public function fetch(int $ttl = null) * @param int|null $ttl * @return int */ - private function getTTL(int $ttl = null): int + private function getTTL(?int $ttl = null): int { return intval($ttl ?? $this->ttl ?? config('redis-helpers.ttl')); } diff --git a/tests/Assets/DateHash.php b/tests/Assets/DateHash.php index 01f5a6d..fd297db 100644 --- a/tests/Assets/DateHash.php +++ b/tests/Assets/DateHash.php @@ -24,7 +24,7 @@ class DateHash * @param string|null $datetime * @param string $format */ - public function __construct(string $datetime = null, string $format = 'Y-m-d') + public function __construct(?string $datetime = null, string $format = 'Y-m-d') { $this->format = $format; $this->date = date($this->format, strtotime($datetime ?? now()));