Skip to content

Commit

Permalink
Add native types and PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSiepmann committed Jul 17, 2023
1 parent 1e23d21 commit 157ccd5
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 138 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
],
"require": {
"php": "~8.1.0",
"ericmartel/codeception-email": "^1.0",
"guzzlehttp/guzzle": "^6.1 || ^7.0"
"guzzlehttp/guzzle": "^6.1 || ^7.0",
"codeception/codeception": "^5.0"
},
"autoload": {
"psr-4": {
Expand Down
51 changes: 51 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
parameters:
ignoreErrors:
-
message: "#^Access to an undefined property object\\:\\:\\$Body\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Access to an undefined property object\\:\\:\\$Content\\.$#"
count: 11
path: src/MailHog.php

-
message: "#^Access to an undefined property object\\:\\:\\$MIME\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Cannot access property \\$ID on object\\|null\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Method Codeception\\\\Module\\\\MailHog\\:\\:getFullEmail\\(\\) should return object but returns mixed\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Parameter \\#1 \\$inbox of method Codeception\\\\Module\\\\MailHog\\:\\:sortEmails\\(\\) expects array\\<object\\>, mixed given\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Parameter \\#1 \\$string of function mb_decode_mimeheader expects string, string\\|null given\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\|string given\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Property Codeception\\\\Module\\\\MailHog\\:\\:\\$fetchedEmails \\(array\\<object\\>\\) does not accept mixed\\.$#"
count: 1
path: src/MailHog.php

-
message: "#^Variable \\$response might not be defined\\.$#"
count: 1
path: src/MailHog.php
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
includes:
- phpstan-baseline.neon
parameters:
level: max
phpVersion: 80100
reportUnmatchedIgnoredErrors: true
paths:
- src
Loading

0 comments on commit 157ccd5

Please sign in to comment.