Skip to content

Commit d5b7db8

Browse files
committed
fixed PHPStan errors
1 parent 2cb6dbc commit d5b7db8

3 files changed

Lines changed: 35 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"nette/di": "^3.1 || ^4.0",
2424
"nette/tester": "^2.6",
2525
"tracy/tracy": "^2.8",
26-
"phpstan/phpstan-nette": "^2.0@stable"
26+
"phpstan/phpstan": "^2.0@stable"
2727
},
2828
"suggest": {
2929
"ext-fileinfo": "to detect type of attached files",

phpstan-baseline.neon

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Parameter \#1 \$callbacks of static method Nette\\Utils\\Arrays\:\:invoke\(\) expects iterable\<callable\(mixed \.\.\.\)\: mixed\>, array\<callable\(Nette\\Mail\\FallbackMailer, Nette\\Mail\\SendException, Nette\\Mail\\Mailer, Nette\\Mail\\Message\)\: void\> given\.$#'
5+
identifier: argument.type
6+
count: 1
7+
path: src/Mail/FallbackMailer.php
8+
9+
-
10+
message: '#^Parameter \#3 \$replacement of static method Nette\\Utils\\Strings\:\:replace\(\) expects \(callable\(array\<string\|null\>\)\: string\)\|string, Closure\(array\)\: void given\.$#'
11+
identifier: argument.type
12+
count: 1
13+
path: src/Mail/Message.php
14+
15+
-
16+
message: '#^Parameter \#3 \$onError of static method Nette\\Utils\\Callback\:\:invokeSafe\(\) expects callable\(string, int\)\: \(bool\|null\), Closure\(string\)\: void given\.$#'
17+
identifier: argument.type
18+
count: 1
19+
path: src/Mail/SendmailMailer.php
20+
21+
-
22+
message: '#^Method Nette\\Mail\\SmtpMailer\:\:__construct\(\) has parameter \$streamOptions with no value type specified in iterable type array\.$#'
23+
identifier: missingType.iterableValue
24+
count: 1
25+
path: src/Mail/SmtpMailer.php

phpstan.neon

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
parameters:
2-
level: 5
2+
level: 6
33

44
paths:
55
- src
66

7+
checkMissingCallableSignature: true
8+
9+
ignoreErrors:
10+
- # backward compatibility alias IMailer
11+
identifier: if.alwaysFalse
12+
path: src/Mail/Mailer.php
13+
714
includes:
8-
- vendor/phpstan/phpstan-nette/extension.neon
15+
- phpstan-baseline.neon

0 commit comments

Comments
 (0)