Skip to content

Commit f96fca2

Browse files
committed
Prop name update admin -> adminId
1 parent 1d58bbc commit f96fca2

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/Domain/Messaging/Model/BounceRegex.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class BounceRegex implements DomainModel, Identity
3131
#[ORM\Column(name: 'listorder', type: 'integer', nullable: true, options: ['default' => 0])]
3232
private ?int $listOrder = 0;
3333

34-
#[ORM\Column(type: 'integer', nullable: true)]
35-
private ?int $admin;
34+
#[ORM\Column(name: 'admin', type: 'integer', nullable: true)]
35+
private ?int $adminId;
3636

3737
#[ORM\Column(type: 'text', nullable: true)]
3838
private ?string $comment;
@@ -48,7 +48,7 @@ public function __construct(
4848
?string $regexHash = null,
4949
?string $action = null,
5050
?int $listOrder = 0,
51-
?int $admin = null,
51+
?int $adminId = null,
5252
?string $comment = null,
5353
?string $status = null,
5454
?int $count = 0
@@ -57,7 +57,7 @@ public function __construct(
5757
$this->regexHash = $regexHash;
5858
$this->action = $action;
5959
$this->listOrder = $listOrder;
60-
$this->admin = $admin;
60+
$this->adminId = $adminId;
6161
$this->comment = $comment;
6262
$this->status = $status;
6363
$this->count = $count;
@@ -112,14 +112,14 @@ public function setListOrder(?int $listOrder): self
112112
return $this;
113113
}
114114

115-
public function getAdmin(): ?int
115+
public function getAdminId(): ?int
116116
{
117-
return $this->admin;
117+
return $this->adminId;
118118
}
119119

120-
public function setAdmin(?int $admin): self
120+
public function setAdminId(?int $adminId): self
121121
{
122-
$this->admin = $admin;
122+
$this->adminId = $adminId;
123123
return $this;
124124
}
125125

src/Domain/Messaging/Service/Manager/BounceRegexManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function createOrUpdateFromPattern(
3030
string $regex,
3131
?string $action = null,
3232
?int $listOrder = 0,
33-
?int $admin = null,
33+
?int $adminId = null,
3434
?string $comment = null,
3535
?string $status = null
3636
): BounceRegex {
@@ -42,7 +42,7 @@ public function createOrUpdateFromPattern(
4242
$existing->setRegex($regex)
4343
->setAction($action ?? $existing->getAction())
4444
->setListOrder($listOrder ?? $existing->getListOrder())
45-
->setAdmin($admin ?? $existing->getAdmin())
45+
->setAdminId($adminId ?? $existing->getAdminId())
4646
->setComment($comment ?? $existing->getComment())
4747
->setStatus($status ?? $existing->getStatus());
4848

@@ -56,7 +56,7 @@ public function createOrUpdateFromPattern(
5656
regexHash: $regexHash,
5757
action: $action,
5858
listOrder: $listOrder,
59-
admin: $admin,
59+
adminId: $adminId,
6060
comment: $comment,
6161
status: $status,
6262
count: 0

tests/Unit/Domain/Messaging/Service/Manager/BounceRegexManagerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testCreateNewRegex(): void
4949
regex: $pattern,
5050
action: 'delete',
5151
listOrder: 5,
52-
admin: 1,
52+
adminId: 1,
5353
comment: 'test',
5454
status: 'active'
5555
);
@@ -59,7 +59,7 @@ public function testCreateNewRegex(): void
5959
$this->assertSame($expectedHash, $regex->getRegexHash());
6060
$this->assertSame('delete', $regex->getAction());
6161
$this->assertSame(5, $regex->getListOrder());
62-
$this->assertSame(1, $regex->getAdmin());
62+
$this->assertSame(1, $regex->getAdminId());
6363
$this->assertSame('test', $regex->getComment());
6464
$this->assertSame('active', $regex->getStatus());
6565
}
@@ -74,7 +74,7 @@ public function testUpdateExistingRegex(): void
7474
regexHash: $hash,
7575
action: 'keep',
7676
listOrder: 0,
77-
admin: null,
77+
adminId: null,
7878
comment: null,
7979
status: 'inactive',
8080
count: 3
@@ -93,14 +93,14 @@ public function testUpdateExistingRegex(): void
9393
regex: $pattern,
9494
action: 'delete',
9595
listOrder: 10,
96-
admin: 2,
96+
adminId: 2,
9797
comment: 'upd',
9898
status: 'active'
9999
);
100100

101101
$this->assertSame('delete', $updated->getAction());
102102
$this->assertSame(10, $updated->getListOrder());
103-
$this->assertSame(2, $updated->getAdmin());
103+
$this->assertSame(2, $updated->getAdminId());
104104
$this->assertSame('upd', $updated->getComment());
105105
$this->assertSame('active', $updated->getStatus());
106106
$this->assertSame($hash, $updated->getRegexHash());

0 commit comments

Comments
 (0)