Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ parameters:
count: 1
path: ../../src/Value/Value.php

-
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with ''red'' and Sabberworm\\CSS\\Value\\Value will always evaluate to false\.$#'
identifier: staticMethod.impossibleType
count: 1
path: ../../tests/ParserTest.php

Comment on lines -51 to -56
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That this warning existed indicates something is returning a string but has DocBlock type indicating a different return type.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1584 resolves this concern. Turns out the test code had a loop with no iterations, within which was the assertSame() which would always fail, but was never called.

-
message: '#^Parameter \#1 \$value of method Sabberworm\\CSS\\Property\\Declaration\:\:setValue\(\) expects Sabberworm\\CSS\\Value\\RuleValueList\|string\|null, Sabberworm\\CSS\\Value\\Size given\.$#'
identifier: argument.type
Expand Down
2 changes: 2 additions & 0 deletions Build/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ parameters:
- %currentWorkingDirectory%/src/
- %currentWorkingDirectory%/tests/

treatPhpDocTypesAsCertain: false

type_perfect:
no_mixed_property: true
no_mixed_caller: true
Expand Down