Skip to content

Commit 83546e1

Browse files
committed
Improve compatibility with PHPStan 1.0
1 parent d68938d commit 83546e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Type/WebMozartAssert/data/data.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k,
3030
\PHPStan\Testing\assertType('float', $f);
3131

3232
Assert::numeric($g);
33-
\PHPStan\Testing\assertType('float|int|(string&numeric)', $g);
33+
\PHPStan\Testing\assertType('float|int|numeric-string', $g);
3434

3535
Assert::boolean($h);
3636
\PHPStan\Testing\assertType('bool', $h);
@@ -104,7 +104,7 @@ public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k,
104104
$z = [-1, -2, -3];
105105
}
106106
Assert::allNotSame($z, -1);
107-
\PHPStan\Testing\assertType('array(1, -2|2, -3|3)', $z);
107+
\PHPStan\Testing\assertType('array{1, -2|2, -3|3}', $z);
108108

109109
Assert::subclassOf($aa, self::class);
110110
\PHPStan\Testing\assertType('class-string<PHPStan\Type\WebMozartAssert\Foo>|PHPStan\Type\WebMozartAssert\Foo', $aa);
@@ -117,7 +117,7 @@ public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k,
117117
\PHPStan\Testing\assertType('non-empty-string', $ac);
118118

119119
Assert::integerish($ad);
120-
\PHPStan\Testing\assertType('float|int|(string&numeric)', $ad);
120+
\PHPStan\Testing\assertType('float|int|numeric-string', $ad);
121121

122122
Assert::implementsInterface($ae, Baz::class);
123123
\PHPStan\Testing\assertType('PHPStan\Type\WebMozartAssert\Baz', $ae);
@@ -129,7 +129,7 @@ public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k,
129129
/** @var array{foo?: string, bar?: string} $things */
130130
$things = doFoo();
131131
Assert::keyExists($things, 'foo');
132-
\PHPStan\Testing\assertType('array(\'foo\' => string, ?\'bar\' => string)', $things);
132+
\PHPStan\Testing\assertType('array{foo: string, bar?: string}', $things);
133133

134134
Assert::classExists($ag);
135135
\PHPStan\Testing\assertType('class-string', $ag);

0 commit comments

Comments
 (0)