Skip to content

Commit 42e1d42

Browse files
committed
Fixing PHP 7.4 deprectations
1 parent 57e1a0a commit 42e1d42

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/TDBMDaoGeneratorTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Ramsey\Uuid\Uuid;
3131
use ReflectionClass;
3232
use ReflectionMethod;
33+
use ReflectionNamedType;
3334
use TheCodingMachine\TDBM\Dao\TestAlbumDao;
3435
use TheCodingMachine\TDBM\Dao\TestArticleDao;
3536
use TheCodingMachine\TDBM\Dao\TestCountryDao;
@@ -1611,9 +1612,10 @@ public function testUuidv4(): void
16111612
public function testTypeHintedConstructors(): void
16121613
{
16131614
$userBaseBeanReflectionConstructor = new \ReflectionMethod(UserBaseBean::class, '__construct');
1615+
/** @var ReflectionNamedType $nameParam */
16141616
$nameParam = $userBaseBeanReflectionConstructor->getParameters()[0];
16151617

1616-
$this->assertSame('string', (string)$nameParam->getType());
1618+
$this->assertSame('string', $nameParam->getType()->getName());
16171619
}
16181620

16191621
/**
@@ -1826,7 +1828,7 @@ public function testFilterBag(): void
18261828
public function testDecimalIsMappedToString(): void
18271829
{
18281830
$reflectionClass = new \ReflectionClass(BoatBaseBean::class);
1829-
$this->assertSame('string', (string) $reflectionClass->getMethod('getLength')->getReturnType());
1831+
$this->assertSame('string', $reflectionClass->getMethod('getLength')->getReturnType()->getName());
18301832
}
18311833

18321834
/**

0 commit comments

Comments
 (0)