Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psalm errors #1130

Open
JakeQZ opened this issue Dec 13, 2021 · 1 comment
Open

Psalm errors #1130

JakeQZ opened this issue Dec 13, 2021 · 1 comment
Assignees
Milestone

Comments

@JakeQZ
Copy link
Contributor

JakeQZ commented Dec 13, 2021

https://github.com/MyIntervals/emogrifier/runs/4501517147

ERROR: UnnecessaryVarAnnotation - src/Css/CssDocument.php:44:18 - The @var Sabberworm\CSS\CSSList\Document annotation for $sabberwormCssDocument is unnecessary (see https://psalm.dev/212)
        /** @var SabberwormCssDocument $sabberwormCssDocument */


ERROR: ArgumentTypeCoercion - src/Css/CssDocument.php:98:39 - Argument 1 of Sabberworm\CSS\CSSList\Document::setContents expects array<int, Sabberworm\CSS\CSSList\CSSList|Sabberworm\CSS\Property\Charset|Sabberworm\CSS\Property\Import|Sabberworm\CSS\RuleSet\RuleSet>, parent type non-empty-array<int, Sabberworm\CSS\Renderable> provided (see https://psalm.dev/193)
        $atRulesDocument->setContents($atRules);


ERROR: UnnecessaryVarAnnotation - src/Css/CssDocument.php:100:18 - The @var string annotation for $renderedRules is unnecessary (see https://psalm.dev/212)
        /** @var string $renderedRules */


ERROR: UnnecessaryVarAnnotation - src/Css/CssDocument.php:118:22 - The @var string annotation for $mediaQueryList is unnecessary (see https://psalm.dev/212)
            /** @var string $mediaQueryList */


ERROR: InvalidArgument - tests/Unit/Css/StyleRuleTest.php:96:29 - Argument 1 of Sabberworm\CSS\Rule\Rule::setValue expects Sabberworm\CSS\Value\RuleValueList|null, string provided (see https://psalm.dev/004)
            $rule->setValue($declaration['value']);

Probably relates to #1127.

@JakeQZ JakeQZ added the bug label Dec 13, 2021
@JakeQZ JakeQZ added this to the 7.0.0 milestone Dec 13, 2021
@oliverklee oliverklee self-assigned this Dec 13, 2021
oliverklee added a commit that referenced this issue Dec 13, 2021
Fixes #127

Also fixes parts of #1130 by removing some redundant type annotations,
and log the other Psalm warnings into the Psalm baseline so we can
fix them later.
oliverklee added a commit that referenced this issue Dec 13, 2021
Fixes #1127

Also fixes parts of #1130 by removing some redundant type annotations,
and log the other Psalm warnings into the Psalm baseline so we can
fix them later.
oliverklee added a commit that referenced this issue Dec 13, 2021
Fixes #1127

Also fixes parts of #1130 by removing some redundant type annotations,
and log the other Psalm warnings into the Psalm baseline so we can
fix them later.
@oliverklee
Copy link
Contributor

MyIntervals/PHP-CSS-Parser#348 fixes on of the two remaining warnings.

@oliverklee oliverklee modified the milestones: 7.0.0, 8.0.0 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants