Skip to content

Commit f297324

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 0e6822b + f0588bc commit f297324

File tree

5 files changed

+71
-7
lines changed

5 files changed

+71
-7
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ jobs:
55
- stage: "PHP7.2 - lowest"
66
php: 7.2
77
script:
8-
- composer update -n --prefer-dist --prefer-lowest --no-suggest
8+
- composer update -n --prefer-dist --prefer-lowest --no-suggest
99
- composer dump-autoload
10-
- php vendor/bin/phpunit
10+
- composer ci:tests
11+
- composer ci:php:psalm
1112

1213
- stage: "PHP7.3 - highest"
1314
php: 7.3
1415
script:
1516
- composer update -n --prefer-dist --no-suggest
1617
- composer dump-autoload
17-
- php vendor/bin/phpunit
18+
- composer ci:tests
19+
- composer ci:php:psalm
1820

1921
- stage: "PHP7.4 - highest"
2022
php: 7.4
2123
script:
2224
- composer update -n --prefer-dist --no-suggest
2325
- composer dump-autoload
24-
- php vendor/bin/phpunit
26+
- composer ci:tests
27+
- composer ci:php:psalm

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@
5252
"require-dev": {
5353
"symfony/process": "^4.3",
5454
"phpunit/phpunit": "^8.0",
55-
"clue/block-react": "^1.3"
55+
"clue/block-react": "^1.3",
56+
"vimeo/psalm": "^3.8"
57+
},
58+
59+
"scripts": {
60+
"ci:php:psalm": "vendor/bin/psalm --show-info=false",
61+
"ci:tests": "vendor/bin/phpunit tests"
5662
},
5763
"minimum-stability": "alpha"
5864
}

psalm.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
totallyTyped="false"
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+
<LessSpecificReturnType errorLevel="info" />
18+
19+
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
20+
21+
<DeprecatedMethod errorLevel="info" />
22+
<DeprecatedProperty errorLevel="info" />
23+
<DeprecatedClass errorLevel="info" />
24+
<DeprecatedConstant errorLevel="info" />
25+
<DeprecatedFunction errorLevel="info" />
26+
<DeprecatedInterface errorLevel="info" />
27+
<DeprecatedTrait errorLevel="info" />
28+
29+
<InternalMethod errorLevel="info" />
30+
<InternalProperty errorLevel="info" />
31+
<InternalClass errorLevel="info" />
32+
33+
<MissingClosureReturnType errorLevel="info" />
34+
<MissingReturnType errorLevel="info" />
35+
<MissingPropertyType errorLevel="suppress" />
36+
<InvalidDocblock errorLevel="info" />
37+
<MisplacedRequiredParam errorLevel="info" />
38+
39+
<PropertyNotSetInConstructor errorLevel="info" />
40+
<MissingConstructor errorLevel="info" />
41+
<MissingClosureParamType errorLevel="info" />
42+
<MissingParamType errorLevel="info" />
43+
44+
<RedundantCondition errorLevel="info" />
45+
46+
<DocblockTypeContradiction errorLevel="info" />
47+
<RedundantConditionGivenDocblockType errorLevel="info" />
48+
49+
<UnresolvableInclude errorLevel="info" />
50+
51+
<RawObjectIteration errorLevel="info" />
52+
53+
<InvalidStringClass errorLevel="info" />
54+
</issueHandlers>
55+
</psalm>

src/Filesystem/ChangesListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private function handleOutput(Process $process): void
3636
throw new RuntimeException('Cannot open STDOUT for filesystem watcher');
3737
}
3838

39-
$process->stdout->on('data', function ($data) {
39+
$process->stdout->on('data', function (string $data) {
4040
if ((bool)$data) {
4141
$this->emit('change');
4242
}

src/WatcherCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6161
*/
6262
private function addTerminationListeners(LoopInterface $loop, SpinnerInterface $spinner): void
6363
{
64-
$func = static function (int $signal) use ($spinner) {
64+
$func = static function (int $signal) use ($spinner): void {
6565
$spinner->end();
6666
exit($signal);
6767
};

0 commit comments

Comments
 (0)