Skip to content

Commit 491c7ec

Browse files
petrparolekf3l1x
authored andcommitted
upgrade PHPStan
1 parent 3e48e57 commit 491c7ec

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ csf:
1212
vendor/bin/codefixer src tests
1313

1414
phpstan:
15-
vendor/bin/phpstan analyse -l max -c phpstan.neon src
15+
vendor/bin/phpstan analyse -l 8 -c phpstan.neon src
1616

1717
tests:
1818
vendor/bin/tester -s -p php --colors 1 -C tests/cases

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
"nette/neon": "^3.0.0"
2323
},
2424
"require-dev": {
25-
"composer/composer": "^1.6.3",
25+
"composer/composer": "^1.6.3|^2.0",
2626
"mockery/mockery": "^1.3.0",
2727
"ninjify/nunjuck": "^0.4",
2828
"ninjify/qa": "^0.12",
29-
"phpstan/phpstan": "^0.12",
30-
"phpstan/phpstan-deprecation-rules": "^0.12",
31-
"phpstan/phpstan-nette": "^0.12",
32-
"phpstan/phpstan-strict-rules": "^0.12"
29+
"phpstan/phpstan": "^1.0",
30+
"phpstan/phpstan-deprecation-rules": "^1.0",
31+
"phpstan/phpstan-nette": "^1.0",
32+
"phpstan/phpstan-strict-rules": "^1.0"
3333
},
3434
"autoload": {
3535
"psr-4": {

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parameters:
88
ignoreErrors:
99
# phpstan error
1010
- '#^Strict comparison using === between string and false will always evaluate to false.#'
11+
- '#^Binary operation "." between non-empty-string and array\|bool\|float\|int\|string\|null results in an error#'
1112

1213
# too lazy to solve
1314
- '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'

src/Decoder/DecoderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class DecoderFactory implements IDecoderFactory
88
{
99

10-
/** @var string[] */
10+
/** @var array<string, class-string<IDecoder>> **/
1111
private $decodersMap = [
1212
'json' => JsonDecoder::class,
1313
'neon' => NeonDecoder::class,

src/Encoder/EncoderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class EncoderFactory implements IEncoderFactory
88
{
99

10-
/** @var string[] */
10+
/** @var array<string, class-string<IEncoder>> **/
1111
private $encodersMap = [
1212
'json' => JsonEncoder::class,
1313
'neon' => NeonEncoder::class,

src/TaskSet.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ public function set(array $args): void
7272
foreach ($input->getOptions() as $key => $value) {
7373
// Black magic. It parse --database.host=localhost into $tmp array.
7474
// Easy to use! :-)
75-
/** @var string $value */
76-
$value = $value;
7775
parse_str('parameters[' . str_replace('.', '][', $key) . ']=' . $value, $tmp);
7876

7977
// Merge user inputs

0 commit comments

Comments
 (0)