diff --git a/.gitattributes b/.gitattributes
index 3283893..65f4080 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,11 +4,6 @@
.travis.yml export-ignore
docs/ export-ignore
phpcs.xml.dist export-ignore
-phpstan-tests.neon export-ignore
-phpstan.neon export-ignore
phpunit.xml.dist export-ignore
-psalm-baseline.xml export-ignore
-psalm.xml export-ignore
resources/ export-ignore
-static-analysis/ export-ignore
tests/ export-ignore
diff --git a/composer.json b/composer.json
index a69ee38..a0cbd62 100644
--- a/composer.json
+++ b/composer.json
@@ -65,6 +65,7 @@
},
"autoload-dev": {
"psr-4": {
+ "Ramsey\\Uuid\\StaticAnalysis\\": "tests/static-analysis/",
"Ramsey\\Uuid\\Test\\": "tests/"
}
},
@@ -73,10 +74,10 @@
"phpcbf": "phpcbf -vpw",
"phpcs": "phpcs",
"phpstan": [
- "phpstan analyse -c phpstan.neon src --level max --no-progress",
- "phpstan analyse -c phpstan-tests.neon tests --level max --no-progress"
+ "phpstan analyse -c tests/phpstan.neon src --level max --no-progress",
+ "phpstan analyse -c tests/phpstan-tests.neon tests --level max --no-progress"
],
- "psalm": "psalm --show-info=false",
+ "psalm": "psalm --show-info=false --config=tests/psalm.xml",
"phpunit": "phpunit --verbose --colors=always",
"phpunit-coverage": "phpunit --verbose --colors=always --coverage-html build/coverage",
"test": [
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 2baddc9..817b034 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -12,7 +12,6 @@
./src
- ./static-analysis
./tests
diff --git a/psalm.xml b/psalm.xml
deleted file mode 100644
index d3e6c20..0000000
--- a/psalm.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/phpstan-tests.neon b/tests/phpstan-tests.neon
similarity index 61%
rename from phpstan-tests.neon
rename to tests/phpstan-tests.neon
index 34f6318..10e26b4 100644
--- a/phpstan-tests.neon
+++ b/tests/phpstan-tests.neon
@@ -1,28 +1,24 @@
parameters:
autoload_files:
- - tests/phpstan-bootstrap.php
+ - ./phpstan-bootstrap.php
checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: false
excludes_analyse:
- - tests/ExpectedBehaviorTest.php
+ - ./ExpectedBehaviorTest.php
ignoreErrors:
-
message: "#^Function uuid_create\\(\\) has no return typehint specified\\.$#"
count: 1
- path: tests/phpstan-bootstrap.php
+ path: phpstan-bootstrap.php
-
message: "#^Function uuid_create\\(\\) has parameter \\$uuid_type with no typehint specified\\.$#"
count: 1
- path: tests/phpstan-bootstrap.php
+ path: phpstan-bootstrap.php
-
message: "#^Function uuid_parse\\(\\) has no return typehint specified\\.$#"
count: 1
- path: tests/phpstan-bootstrap.php
+ path: phpstan-bootstrap.php
-
message: "#^Function uuid_parse\\(\\) has parameter \\$uuid with no typehint specified\\.$#"
count: 1
- path: tests/phpstan-bootstrap.php
- -
- message: "#^Unreachable statement - code above always terminates\\.$#"
- count: 3
- path: tests/UuidTest.php
+ path: phpstan-bootstrap.php
diff --git a/phpstan.neon b/tests/phpstan.neon
similarity index 65%
rename from phpstan.neon
rename to tests/phpstan.neon
index b288b7b..60d4939 100644
--- a/phpstan.neon
+++ b/tests/phpstan.neon
@@ -2,21 +2,21 @@ parameters:
checkMissingIterableValueType: false
reportUnmatchedIgnoredErrors: false
autoload_files:
- - tests/phpstan-bootstrap.php
+ - ./phpstan-bootstrap.php
ignoreErrors:
-
message: '#^Call to function is_int\(\) with float will always evaluate to false\.$#'
- count: 2
- path: src/Converter/Time/PhpTimeConverter.php
+ count: 1
+ path: ../src/Converter/Time/PhpTimeConverter.php
-
message: '#^Unreachable statement - code above always terminates\.$#'
- count: 2
- path: src/Converter/Time/PhpTimeConverter.php
+ count: 1
+ path: ../src/Converter/Time/PhpTimeConverter.php
-
message: '#^Comparison operation "<" between int<6, max> and 0 is always false\.$#'
count: 1
- path: src/Generator/CombGenerator.php
+ path: ../src/Generator/CombGenerator.php
-
message: '#^Comparison operation ">" between 6 and 0 is always true\.$#'
count: 1
- path: src/Generator/CombGenerator.php
+ path: ../src/Generator/CombGenerator.php
diff --git a/psalm-baseline.xml b/tests/psalm-baseline.xml
similarity index 100%
rename from psalm-baseline.xml
rename to tests/psalm-baseline.xml
diff --git a/tests/psalm.xml b/tests/psalm.xml
new file mode 100644
index 0000000..3964807
--- /dev/null
+++ b/tests/psalm.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/static-analysis/UuidIsImmutable.php b/tests/static-analysis/UuidIsImmutable.php
similarity index 100%
rename from static-analysis/UuidIsImmutable.php
rename to tests/static-analysis/UuidIsImmutable.php