Skip to content

Commit

Permalink
[TASK] Update to Psalm 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee committed Jan 23, 2023
1 parent 06785d1 commit 4dc929b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<phar name="php-cs-fixer" version="^3.13.0" installed="3.13.0" location="./.phive/php-cs-fixer" copy="false"/>
<phar name="phpcs" version="^3.7.1" installed="3.7.1" location="./.phive/phpcs" copy="false"/>
<phar name="phpmd" version="^2.13.0" installed="2.13.0" location="./.phive/phpmd" copy="false"/>
<phar name="psalm" version="^5.0.0" installed="5.0.0" location="./.phive/psalm" copy="false"/>
<phar name="psalm" version="^5.5.0" installed="5.5.0" location="./.phive/psalm" copy="false"/>
</phive>
90 changes: 15 additions & 75 deletions psalm.baseline.xml
Original file line number Diff line number Diff line change
@@ -1,80 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@">
<files psalm-version="5.5.0@b63061a27f2683ec0f3509012bb22daab3b65b61">
<file src="src/CssInliner.php">
<InvalidArgument occurrences="1"/>
<MixedArgument occurrences="1">
<code>$styleNode</code>
</MixedArgument>
<MixedAssignment occurrences="8">
<code>$matchingNodes</code>
<code>$node</code>
<code>$nodesMatchingCssSelectors</code>
<code>$nodesMatchingSelector</code>
<code>$parentNode</code>
<code>$path</code>
<code>$styleNode</code>
<code>$styleNodes</code>
</MixedAssignment>
<MixedMethodCall occurrences="1">
<code>getNodePath</code>
</MixedMethodCall>
<MixedOperand occurrences="2">
<code>$path</code>
<InvalidArgument>
<code>\usort(
$cssRules['inlinable'],
/**
* @param array{selector: string, line: int} $first
* @param array{selector: string, line: int} $second
*/
function (array $first, array $second): int {
return $this-&gt;sortBySelectorPrecedence($first, $second);
}
)</code>
</InvalidArgument>
<PossiblyNullOperand>
<code>$styleNode-&gt;nodeValue</code>
</MixedOperand>
<MixedPropertyFetch occurrences="3">
<code>$nodesMatchingSelector-&gt;length</code>
<code>$styleNode-&gt;nodeValue</code>
<code>$styleNode-&gt;parentNode</code>
</MixedPropertyFetch>
<RawObjectIteration occurrences="3">
<code>$matchingNodes</code>
<code>$nodesMatchingCssSelectors</code>
<code>$styleNodes</code>
</RawObjectIteration>
<ReservedWord occurrences="3">
<code>$matchingNodes</code>
<code>$nodesMatchingCssSelectors</code>
<code>$styleNodes</code>
</ReservedWord>
<UndefinedClass occurrences="1">
<code>$nodesMatchingSelector-&gt;length</code>
</UndefinedClass>
</file>
<file src="src/HtmlProcessor/CssToAttributeConverter.php">
<MixedInferredReturnType occurrences="1">
<code>\DOMNodeList</code>
</MixedInferredReturnType>
<MixedReturnStatement occurrences="1">
<code>$this-&gt;getXPath()-&gt;query('//*[@style]')</code>
</MixedReturnStatement>
</file>
<file src="src/HtmlProcessor/HtmlPruner.php">
<MixedArgument occurrences="2">
<code>$elementsWithClassAttribute</code>
<code>$elementsWithClassAttribute</code>
</MixedArgument>
<MixedAssignment occurrences="4">
<code>$element</code>
<code>$elementsWithClassAttribute</code>
<code>$elementsWithStyleDisplayNone</code>
<code>$parentNode</code>
</MixedAssignment>
<MixedMethodCall occurrences="1">
<code>removeChild</code>
</MixedMethodCall>
<MixedPropertyFetch occurrences="2">
<code>$element-&gt;parentNode</code>
<code>$elementsWithStyleDisplayNone-&gt;length</code>
</MixedPropertyFetch>
<RawObjectIteration occurrences="1">
<code>$elementsWithStyleDisplayNone</code>
</RawObjectIteration>
<ReservedWord occurrences="1">
<code>$elementsWithStyleDisplayNone</code>
</ReservedWord>
<UndefinedClass occurrences="1">
<code>$elementsWithStyleDisplayNone-&gt;length</code>
</UndefinedClass>
</PossiblyNullOperand>
</file>
</files>

0 comments on commit 4dc929b

Please sign in to comment.