File tree 1 file changed +10
-8
lines changed 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -264,14 +264,16 @@ private function addEraseCredentials(ClassSourceManipulator $manipulator): void
264
264
265
265
private function addUniqueConstraint (ClassSourceManipulator $ manipulator , UserClassConfiguration $ userClassConfig ): void
266
266
{
267
- if ($ userClassConfig ->isEntity ()) {
268
- $ manipulator ->addAttributeToClass (
269
- 'ORM \\UniqueConstraint ' ,
270
- [
271
- 'name ' => 'UNIQ_IDENTIFIER_ ' .strtoupper (Str::asSnakeCase ($ userClassConfig ->getIdentityPropertyName ())),
272
- 'fields ' => [$ userClassConfig ->getIdentityPropertyName ()],
273
- ]
274
- );
267
+ if (!$ userClassConfig ->isEntity ()) {
268
+ return ;
275
269
}
270
+
271
+ $ manipulator ->addAttributeToClass (
272
+ 'ORM \\UniqueConstraint ' ,
273
+ [
274
+ 'name ' => 'UNIQ_IDENTIFIER_ ' .strtoupper (Str::asSnakeCase ($ userClassConfig ->getIdentityPropertyName ())),
275
+ 'fields ' => [$ userClassConfig ->getIdentityPropertyName ()],
276
+ ]
277
+ );
276
278
}
277
279
}
You can’t perform that action at this time.
0 commit comments