Skip to content

Commit 1791e20

Browse files
committed
chore: Fix phpstan issues
1 parent 6ef6609 commit 1791e20

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Commands/MakeMapperCommand.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,18 @@ protected function buildClass($name): string
9393
if ($this->option('component')) {
9494
$fqn = 'App\\Components\\' . $this->argument('class');
9595
} else {
96-
$fqn = 'App\\Entities\\' . $this->argument('class');
96+
$fqn = 'App\\Entities\\' . $this->argument('class');
9797
}
9898

99+
/** @var array<string, string> $replacements */
99100
$replacements = [
100101
'{{ extraMethods }}' => $this->buildExtraMethods($identity, $table, $connection),
101102
'{{ class }}' => $this->argument('name'),
102103
'{{ entityClass }}' => $fqn,
103104
'{{ componentClass }}' => $fqn,
104-
'{{ identity }}' => $identity,
105-
'{{ table }}' => $table,
106-
'{{ connection }}' => $connection,
105+
'{{ identity }}' => $identity ?? '',
106+
'{{ table }}' => $table ?? '',
107+
'{{ connection }}' => $connection ?? '',
107108
];
108109

109110
return str_replace(

0 commit comments

Comments
 (0)