Skip to content

Commit c89cf60

Browse files
authored
Move visitor classes according to PSR-4 (#170)
1 parent 97a1e36 commit c89cf60

9 files changed

+1113
-1071
lines changed

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
/phpunit.xml.dist export-ignore
1111
/release-latest-versions.sh export-ignore
1212
/source/ export-ignore
13+
/src/ export-ignore
1314
/visitor.php export-ignore
1415
/tests/ export-ignore

Diff for: composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
},
2626
"minimum-stability": "stable",
2727
"autoload-dev": {
28+
"psr-4": {
29+
"PhpStubs\\WordPress\\Core\\": "src/"
30+
},
2831
"classmap": [
2932
"tests/"
3033
]
@@ -43,9 +46,9 @@
4346
"post-update-cmd": "@composer --working-dir=source/ update --no-interaction",
4447
"cleanup": "git status --short --ignored | sed -n -e 's#^!! ##p' | xargs -r rm -vrf",
4548
"test": [
46-
"@test:cs",
49+
"@test:phpunit",
4750
"@test:phpstan",
48-
"@test:phpunit"
51+
"@test:cs"
4952
],
5053
"test:cs": "phpcs",
5154
"test:cs:fix": "phpcbf",

Diff for: phpcs.xml.dist

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<ruleset>
33
<file>finder.php</file>
44
<file>functionMap.php</file>
5-
<!-- <file>visitor.php</file> -->
5+
<file>src/</file>
6+
<file>visitor.php</file>
67

78
<rule ref="PSR12NeutronRuleset">
89
<exclude name="Generic.Files.LineLength"/>

Diff for: phpstan.neon.dist

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ parameters:
33
- finder.php
44
- functionMap.php
55
- visitor.php
6+
- src/
67
- tests/
78
excludePaths:
89
- tests/data/

0 commit comments

Comments
 (0)