Skip to content

Commit 5c3c15e

Browse files
author
mscherer
committed
Fix up PHPStan
1 parent bcead8a commit 5c3c15e

40 files changed

+51
-104
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ on:
88
jobs:
99
testsuite:
1010
name: Unittests
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php-version: ['8.1', '8.3']
15+
php-version: ['8.1', '8.5']
1616
dependencies: ['highest']
1717
include:
1818
- php-version: '8.1'
1919
dependencies: 'lowest'
20-
- php-version: '8.3'
20+
- php-version: '8.5'
2121
dependencies: 'highest'
2222

2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525

2626
- name: Setup PHP
2727
uses: shivammathur/setup-php@v2
@@ -51,10 +51,10 @@ jobs:
5151

5252
cs-stan:
5353
name: Coding Standard & Static Analysis
54-
runs-on: ubuntu-22.04
54+
runs-on: ubuntu-24.04
5555

5656
steps:
57-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v5
5858

5959
- name: Setup PHP
6060
uses: shivammathur/setup-php@v2
@@ -68,7 +68,7 @@ jobs:
6868
run: composer install
6969

7070
- name: Run phpcs
71-
run: vendor/bin/phpcs --version && vendor/bin/phpcs --report=checkstyle | cs2pr
71+
run: vendor/bin/phpcs --report=checkstyle | cs2pr
7272

7373
- name: Run phpstan
74-
run: vendor/bin/phpstan -V && vendor/bin/phpstan analyze --error-format=github
74+
run: vendor/bin/phpstan analyze --error-format=github

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"psr/container": "^1.0|^2.0"
3535
},
3636
"require-dev": {
37-
"phpunit/phpunit": "^10.3",
38-
"phpstan/phpstan": "^1.10",
39-
"php-collective/code-sniffer": "^0.2.1",
37+
"phpunit/phpunit": "^10.3 || ^11.5 || ^12.3",
38+
"phpstan/phpstan": "^2.1",
39+
"php-collective/code-sniffer": "^0.4.1",
4040
"instituteweb/composer-scripts": "^1.1",
4141
"league/flysystem-aws-s3-v3": "^3.22",
4242
"league/flysystem-azure-blob-storage": "^3.22",

config/composer_phive.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

config/composer_post_install.php

Lines changed: 0 additions & 3 deletions
This file was deleted.

config/scrutinizer-setup.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

phpcs.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0"?>
22
<ruleset name="file-storage">
3-
<config name="installed_paths" value="../../php-collective/code-sniffer"/>
4-
53
<arg name="tab-width" value="4"/>
4+
<arg value="nps"/>
65

76
<file>src/</file>
87
<file>tests/</file>

phpstan.neon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ parameters:
22
level: 8
33
paths:
44
- src/
5-
checkMissingIterableValueType: false
6-
checkGenericClassInNonGenericObjectType: false
75
ignoreErrors:
6+
- identifier: missingType.iterableValue

src/Adapter/NullFilesystemAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function write(string $path, string $contents, Config $config): void
3131

3232
/**
3333
* @param string $path
34-
* @param $contents
34+
* @param resource $contents
3535
* @param \League\Flysystem\Config $config
3636
*
3737
* @return void

src/Exception/AdapterFactoryNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php declare(strict_types=1);
1+
<?php declare(strict_types = 1);
22

33
/**
44
* Copyright (c) Florian Krämer (https://florian-kraemer.net)

src/Exception/PackageRequiredException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php declare(strict_types=1);
1+
<?php declare(strict_types = 1);
22

33
/**
44
* Copyright (c) Florian Krämer (https://florian-kraemer.net)

0 commit comments

Comments
 (0)