Skip to content

Commit 3c48cde

Browse files
committed
Explicit nullable
1 parent 4ea20d0 commit 3c48cde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ORMTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ trait ORMTrait
2222
* @throws \InvalidArgumentException if $obj is not given and more than one manager exists
2323
* @throws \InvalidArgumentException if $obj is given and no manager exists for the class or if the manager is not an instance of EntityManagerInterface
2424
*/
25-
protected function getManager(object|string $obj = null): EntityManagerInterface
25+
protected function getManager(object|string|null $obj = null): EntityManagerInterface
2626
{
2727
$obj = is_object($obj) ? $obj::class : (string) $obj;
2828

@@ -60,7 +60,7 @@ protected function getManager(object|string $obj = null): EntityManagerInterface
6060
*
6161
* @return ($expectedType is null ? EntityRepository<TEntity> : TRepository&EntityRepository<TEntity>)
6262
*/
63-
protected function getRepository(object|string $obj, string $expectedType = null): EntityRepository
63+
protected function getRepository(object|string $obj, ?string $expectedType = null): EntityRepository
6464
{
6565
$cls = is_object($obj) ? $obj::class : $obj;
6666

0 commit comments

Comments
 (0)