Skip to content

Commit 5185964

Browse files
author
mscherer
committed
Fix up PHPStan.
1 parent 3120d96 commit 5185964

File tree

61 files changed

+134
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+134
-169
lines changed

.editorconfig

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@
33
root = true
44

55
[*]
6+
indent_size = 4
67
indent_style = space
78
end_of_line = lf
89
insert_final_newline = true
910
trim_trailing_whitespace = true
1011
charset = utf-8
1112

1213
[*.bat]
13-
indent_size = 4
1414
end_of_line = crlf
1515

1616
[*.yml]
17-
indent_size = 4
18-
19-
[*.json]
20-
indent_size = 4
17+
indent_size = 2
2118

2219
[*.neon]
2320
indent_style = tab

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
run: composer update
6565

6666
- name: Run phpcs
67-
run: vendor/bin/phpcs --version && vendor/bin/phpcs --report=checkstyle
67+
run: vendor/bin/phpcs --report=checkstyle
6868

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"require-dev": {
2626
"phpstan/phpstan": "^2.0",
27-
"phpunit/phpunit": "^10.3",
27+
"phpunit/phpunit": "^10.3 || ^11.5 || ^12.4",
2828
"php-collective/code-sniffer": "^0.4.1",
2929
"php-collective/file-storage-image-processor": "dev-master as 0.1.0"
3030
},

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 & 16 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ parameters:
22
level: 8
33
paths:
44
- src/
5-
checkMissingIterableValueType: false
6-
checkGenericClassInNonGenericObjectType: false
75
ignoreErrors:
8-
- '#Offset \''dirname\'' does not exist on array.+#'
6+
- '#Offset ''dirname'' might not exist on array.+#'
7+
- identifier: missingType.iterableValue
8+
- identifier: missingType.generics

src/AdapterCollection.php

Lines changed: 2 additions & 2 deletions
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
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
44
* Licensed under The MIT License
@@ -102,7 +102,7 @@ public function get(string $name): FilesystemAdapter
102102
*/
103103
public function empty(): void
104104
{
105-
unset($this->adapters);
105+
$this->adapters = [];
106106
}
107107

108108
/**

src/AdapterCollectionInterface.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
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
44
* Licensed under The MIT License

0 commit comments

Comments
 (0)