Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Commit ef83d78

Browse files
Fixed deprecated PHP 7.4 code
1 parent 672fae2 commit ef83d78

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/CommandTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ public function testHandlerCanBeResolved()
4848
$params = (new ReflectionClass($handler))->getMethod('handle')->getParameters();
4949
$this->assertCount(1, $params);
5050
$this->assertFalse($params[0]->getType()->allowsNull());
51-
$this->assertTrue(get_class($command) === (string) $params[0]->getType());
51+
$this->assertTrue(get_class($command) === $params[0]->getType()->getName());
5252
}
5353
}

src/EventTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testEventHasRegisteredHandlers()
8181
$params = (new ReflectionClass($handler))->getMethod('handle')->getParameters();
8282
$this->assertCount(1, $params, "Expected '{$handler}::handle' to require exactly 1 argument.");
8383
$this->assertFalse($params[0]->getType()->allowsNull(), "Expected '{$handler}::handle' to require non-null arguments.");
84-
$type = (string) $params[0]->getType();
84+
$type = $params[0]->getType()->getName();
8585
$this->assertTrue($class === $type || (new ReflectionClass($class))->isSubclassOf($type), "Expected '{$class}' to equal or subtype '{$type}' in '{$handler}::handle'.");
8686
}
8787
}

0 commit comments

Comments
 (0)