Skip to content

Commit 5072faf

Browse files
committed
Chore: phpstan
- Added phpstan; - Fixed TagRenderer;
1 parent e99e92f commit 5072faf

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.gitattributes

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
/.github export-ignore
2-
/tests export-ignore
3-
/phpunit.xml.dist export-ignore
4-
/.gitattributes export-ignore
5-
/.gitignore export-ignore
1+
/.github export-ignore
2+
/tests export-ignore
3+
/phpunit.xml.dist export-ignore
4+
/.gitattributes export-ignore
5+
/.gitignore export-ignore
6+
/.php-cs-fixer.dist.php export-ignore
7+
/psalm.xml export-ignore
68

79
*.php diff=php

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"require-dev": {
1818
"ergebnis/composer-normalize": "^2.29",
1919
"friendsofphp/php-cs-fixer": "^3.13",
20+
"phpstan/phpstan": "^1.9",
2021
"phpunit/phpunit": "^9.5",
2122
"vimeo/psalm": "^5.2"
2223
},

phpstan.neon.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- src

src/TagRenderer/TagRenderer.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
class TagRenderer implements TagRendererInterface
1717
{
18-
private array $renderedFiles = [];
1918
private array $defaultAttributes = [];
2019
private array $defaultScriptAttributes = [
2120
'type' => 'application/javascript',
@@ -39,8 +38,6 @@ public function renderWebpackScriptTags(string $entryName, array $extraAttribute
3938
/* @lang text */ '<script %s></script>',
4039
$this->convertArrayToAttributes($attributes)
4140
);
42-
43-
$this->renderedFiles['scripts'][] = $attributes['src'];
4441
}
4542

4643
return implode('', $scriptTags);
@@ -60,8 +57,6 @@ public function renderWebpackLinkTags(string $entryName, array $extraAttributes
6057
/* @lang text */ '<link %s>',
6158
$this->convertArrayToAttributes($attributes)
6259
);
63-
64-
$this->renderedFiles['styles'][] = $attributes['href'];
6560
}
6661

6762
return implode('', $scriptTags);

0 commit comments

Comments
 (0)