Skip to content

Commit 73a2d1f

Browse files
committed
Fix
1 parent 3535f19 commit 73a2d1f

5 files changed

Lines changed: 22 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"amphp/phpunit-util": "^3",
6060
"phpunit/phpunit": "^9",
6161
"amphp/php-cs-fixer-config": "^2",
62-
"psalm/phar": "^5"
62+
"vimeo/psalm": "dev-master"
6363
},
6464
"autoload": {
6565
"psr-4": {

examples/benchmark.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
print "Downloading top 500 domains..." . PHP_EOL;
99

1010
$domains = file_get_contents("https://moz.com/top-500/download?table=top500Domains");
11+
assert($domains !== false);
1112
$domains = array_map(function ($line) {
1213
return trim(explode(",", $line)[1], '"/');
1314
}, array_filter(explode("\n", $domains)));

psalm-baseline.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="dev-master@a75d26a3d425d183da8bef37cfc14976c8d817d6">
3+
<file src="lib/Rfc8484StubDoHResolver.php">
4+
<InvalidReturnStatement>
5+
<code><![CDATA[$promise->await($cancellation)]]></code>
6+
<code>\array_merge(...$records)</code>
7+
</InvalidReturnStatement>
8+
<LessSpecificReturnStatement>
9+
<code>$records</code>
10+
</LessSpecificReturnStatement>
11+
<MoreSpecificReturnType>
12+
<code>array</code>
13+
</MoreSpecificReturnType>
14+
</file>
15+
</files>

psalm.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<?xml version="1.0"?>
22
<psalm
33
errorLevel="2"
4+
findUnusedCode="false"
5+
ignoreInternalFunctionFalseReturn="true"
6+
ignoreInternalFunctionNullReturn="true"
47
resolveFromConfigFile="true"
58
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
69
xmlns="https://getpsalm.org/schema/config"
710
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
11+
errorBaseline="psalm-baseline.xml"
812
>
913
<projectFiles>
1014
<directory name="lib" />

test/DoHConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testAcceptsValidServers(array $nameservers): void
3131
}
3232

3333
/**
34-
* @return list{list{list{Amp\DoH\DoHNameserver}}, list{list{Amp\DoH\DoHNameserver}}, list{list{Amp\DoH\DoHNameserver}}, list{list{Amp\DoH\DoHNameserver}}, list{list{Amp\DoH\DoHNameserver}}, list{list{Amp\DoH\DoHNameserver, Amp\DoH\DoHNameserver}}}
34+
* @return list{list{list{DoHNameserver}}, list{list{DoHNameserver}}, list{list{DoHNameserver}}, list{list{DoHNameserver}}, list{list{DoHNameserver}}, list{list{DoHNameserver, DoHNameserver}}}
3535
*/
3636
public function provideValidServers(): array
3737
{

0 commit comments

Comments
 (0)