mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
PHP80 小修 (#187)
* migrate-php80 fix styles fix static analyse * fix some bugs
This commit is contained in:
@@ -94,9 +94,8 @@ class ZMConfigTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestGetValue
|
||||
* @param mixed $expected
|
||||
*/
|
||||
public function testGetValue(string $key, $expected): void
|
||||
public function testGetValue(string $key, mixed $expected): void
|
||||
{
|
||||
$this->assertSame($expected, self::$config->get($key));
|
||||
}
|
||||
|
||||
@@ -29,9 +29,7 @@ class PipelineTest extends TestCase
|
||||
$pipe = new Pipeline();
|
||||
$a = $pipe->send('APP')
|
||||
->through([TimerMiddleware::class])
|
||||
->then(function (string $value) {
|
||||
return $value;
|
||||
});
|
||||
->then(fn (string $value) => $value);
|
||||
$this->assertEquals('APP', $a);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,8 @@ class ReflectionUtilTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider provideTestVariableToString
|
||||
* @param mixed $variable
|
||||
*/
|
||||
public function testVariableToString($variable, string $expected): void
|
||||
public function testVariableToString(mixed $variable, string $expected): void
|
||||
{
|
||||
$this->assertSame($expected, ReflectionUtil::variableToString($variable));
|
||||
}
|
||||
@@ -61,9 +60,8 @@ class ReflectionUtilTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider provideTestGetCallReflector
|
||||
* @param mixed $callback
|
||||
*/
|
||||
public function testGetCallReflector($callback, \ReflectionFunctionAbstract $expected): void
|
||||
public function testGetCallReflector(mixed $callback, \ReflectionFunctionAbstract $expected): void
|
||||
{
|
||||
$this->assertEquals($expected, ReflectionUtil::getCallReflector($callback));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user