Skip to content

Commit 0ddd14e

Browse files
committed
Add vimeo/psalm
1 parent 47e9f82 commit 0ddd14e

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/.scrutinizer.yml export-ignoree
88
/phpcs.xml export-ignore
99
/phpunit.xml.dist export-ignore
10+
/psalm.xml export-ignore

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
},
2525
"require-dev": {
2626
"phpunit/phpunit": "^9.1",
27-
"squizlabs/php_codesniffer": "^3.5"
27+
"squizlabs/php_codesniffer": "^3.5",
28+
"vimeo/psalm": "^3.12"
2829
},
2930
"autoload": {
3031
"psr-4": {
@@ -38,10 +39,12 @@
3839
},
3940
"scripts": {
4041
"test": "phpunit --colors=always",
42+
"static": "psalm",
4143
"cs-check": "phpcs",
4244
"cs-fix": "phpcbf",
4345
"check": [
4446
"@cs-check",
47+
"@static",
4548
"@test"
4649
]
4750
}

psalm.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
totallyTyped="true"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
>
9+
<projectFiles>
10+
<directory name="src" />
11+
<ignoreFiles>
12+
<directory name="vendor" />
13+
</ignoreFiles>
14+
</projectFiles>
15+
16+
<issueHandlers>
17+
<DocblockTypeContradiction errorLevel="info" />
18+
<MixedAssignment errorLevel="info" />
19+
<MixedArgumentTypeCoercion errorLevel="info" />
20+
<MixedPropertyTypeCoercion errorLevel="info" />
21+
<PropertyNotSetInConstructor errorLevel="info" />
22+
<RedundantCondition errorLevel="info" />
23+
<RedundantConditionGivenDocblockType errorLevel="info" />
24+
<TypeDoesNotContainType errorLevel="info" />
25+
</issueHandlers>
26+
</psalm>

0 commit comments

Comments
 (0)