Skip to content

Commit

Permalink
[TASK] Update the development tools
Browse files Browse the repository at this point in the history
Also update the Psalm baseline.

Also autoformat the code according to the new PHP-CS-Fixer version.
  • Loading branch information
oliverklee committed Feb 24, 2024
1 parent 63065fb commit 5a34d26
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
run: composer config --global --list

- name: Install development tools
run: phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,A972B9ABB95D0B760B51442231C7E470E2138192,9882DD2B38813C08EA651B69A4E55EA12C7C085C,2DE50EB60C013FFFA831040D12CE0F1D262429A5
run: phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,E7A745102ECC980F7338B3079093F8B32E4815AA,2DE50EB60C013FFFA831040D12CE0F1D262429A5

- name: Composer Normalize
run: composer ci:composer:normalize
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
run: composer install --no-progress

- name: Install development tools
run: phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,9882DD2B38813C08EA651B69A4E55EA12C7C085C,2DE50EB60C013FFFA831040D12CE0F1D262429A5
run: phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,E7A745102ECC980F7338B3079093F8B32E4815AA,2DE50EB60C013FFFA831040D12CE0F1D262429A5

- name: Run Command
run: composer ci:php:${{ matrix.command }}
Expand Down
8 changes: 4 additions & 4 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.36.0" installed="2.36.0" location="./.phive/composer-normalize" copy="false"/>
<phar name="php-cs-fixer" version="^3.26.1" installed="3.26.1" location="./.phive/php-cs-fixer" copy="false"/>
<phar name="phpmd" version="^2.13.0" installed="2.13.0" location="./.phive/phpmd" copy="false"/>
<phar name="psalm" version="^5.15.0" installed="5.15.0" location="./.phive/psalm" copy="false"/>
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./.phive/composer-normalize" copy="false"/>
<phar name="php-cs-fixer" version="^3.50.0" installed="3.50.0" location="./.phive/php-cs-fixer" copy="false"/>
<phar name="phpmd" version="^2.15.0" installed="2.15.0" location="./.phive/phpmd" copy="false"/>
<phar name="psalm" version="^5.22.2" installed="5.22.2" location="./.phive/psalm" copy="false"/>
</phive>
27 changes: 25 additions & 2 deletions psalm.baseline.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
<file src="src/CssInliner.php">
<MixedAssignment>
<code><![CDATA[$path]]></code>
</MixedAssignment>
<MixedOperand>
<code><![CDATA[$path]]></code>
</MixedOperand>
<PossiblyInvalidArgument>
<code><![CDATA[$styleNode]]></code>
</PossiblyInvalidArgument>
<PossiblyUndefinedMethod>
<code><![CDATA[getNodePath]]></code>
</PossiblyUndefinedMethod>
</file>
<file src="src/HtmlProcessor/HtmlPruner.php">
<InvalidArgument>
<code><![CDATA[$elementsWithClassAttribute]]></code>
<code><![CDATA[$elementsWithClassAttribute]]></code>
</InvalidArgument>
<PossiblyInvalidArgument>
<code><![CDATA[$element]]></code>
</PossiblyInvalidArgument>
</file>
<file src="tests/Support/Constraint/CssConstraint.php">
<DirectConstructorCall>
<code>parent::__construct()</code>
<code><![CDATA[parent::__construct()]]></code>
</DirectConstructorCall>
</file>
</files>
4 changes: 1 addition & 3 deletions src/HtmlProcessor/AbstractHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ abstract class AbstractHtmlProcessor
*
* Please use `::fromHtml` or `::fromDomDocument` instead.
*/
private function __construct()
{
}
private function __construct() {}

/**
* Builds a new instance from the given HTML.
Expand Down
4 changes: 1 addition & 3 deletions src/HtmlProcessor/HtmlNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@
* - add HEAD and BODY elements (if they are missing)
* - reformat the HTML
*/
class HtmlNormalizer extends AbstractHtmlProcessor
{
}
class HtmlNormalizer extends AbstractHtmlProcessor {}
3 changes: 1 addition & 2 deletions tests/Support/Traits/TestStringConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public function provideNonString(): array
'object' => [(object)[]],
'resource' => [\fopen('php://temp', 'r')],
'callable' => [
static function (): void {
},
static function (): void {},
],
];
}
Expand Down
4 changes: 1 addition & 3 deletions tests/Unit/HtmlProcessor/Fixtures/TestingHtmlProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@
/**
* Fixture class for AbstractHtmlProcessor.
*/
final class TestingHtmlProcessor extends AbstractHtmlProcessor
{
}
final class TestingHtmlProcessor extends AbstractHtmlProcessor {}

0 comments on commit 5a34d26

Please sign in to comment.