Skip to content

Commit c8621bf

Browse files
committed
After review 0
1 parent 6d0fbeb commit c8621bf

File tree

14 files changed

+70
-18
lines changed

14 files changed

+70
-18
lines changed

.coderabbit.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: "en-US"
3+
tone_instructions: "chill"
4+
reviews:
5+
profile: "chill"
6+
high_level_summary: true
7+
collapse_walkthrough: true
8+
suggested_labels: false
9+
high_level_summary_in_walkthrough: false
10+
changed_files_summary: false
11+
poem: false
12+
auto_review:
13+
enabled: true
14+
base_branches:
15+
- ".*"
16+
drafts: false

src/Messaging/Request/CreateBounceRegexRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CreateBounceRegexRequest implements RequestInterface
1717
public ?string $action = null;
1818

1919
#[Assert\Type('integer')]
20-
public ?int $listOrder = 0;
20+
public int $listOrder = 0;
2121

2222
#[Assert\Type('integer')]
2323
public ?int $admin = null;

src/Subscription/Controller/SubscribePageController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ public function updatePage(
219219
active: $updateRequest->active,
220220
owner: $admin,
221221
);
222+
$this->entityManager->flush();
222223

223224
return $this->json($this->normalizer->normalize($updated), Response::HTTP_OK);
224225
}
@@ -273,6 +274,7 @@ public function deletePage(
273274
}
274275

275276
$this->subscribePageManager->deletePage($page);
277+
$this->entityManager->flush();
276278

277279
return $this->json(null, Response::HTTP_NO_CONTENT);
278280
}

tests/Integration/Identity/Fixtures/AdminAttributeDefinitionFixture.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public function load(ObjectManager $manager): void
3535
break;
3636
}
3737
$row = array_combine($headers, $data);
38+
if ($row === false) {
39+
throw new RuntimeException('Malformed CSV data: header/data length mismatch.');
40+
}
3841

3942
$definition = new AdminAttributeDefinition($row['name']);
4043
$this->setSubjectId($definition, (int)$row['id']);

tests/Integration/Identity/Fixtures/AdminAttributeValueFixture.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function load(ObjectManager $manager): void
4040
break;
4141
}
4242
$row = array_combine($headers, $data);
43+
if ($row === false) {
44+
throw new RuntimeException('Malformed CSV data: header/data length mismatch.');
45+
}
4346

4447
$admin = $adminRepository->find($row['admin_id']);
4548
if ($admin === null) {

tests/Integration/Identity/Fixtures/AdministratorFixture.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function load(ObjectManager $manager): void
3737
break;
3838
}
3939
$row = array_combine($headers, $data);
40+
if ($row === false) {
41+
throw new RuntimeException('Malformed CSV data: header/data length mismatch.');
42+
}
4043

4144
// Make fixture idempotent: skip if admin with this ID already exists
4245
$existing = $adminRepository->find($row['id']);

tests/Integration/Identity/Fixtures/AdministratorTokenFixture.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function load(ObjectManager $manager): void
3737
break;
3838
}
3939
$row = array_combine($headers, $data);
40+
if ($row === false) {
41+
throw new RuntimeException('Malformed CSV data: header/data length mismatch.');
42+
}
4043

4144
$admin = $adminRepository->find($row['adminid']);
4245
if ($admin === null) {

tests/Integration/Messaging/Fixtures/MessageFixture.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function load(ObjectManager $manager): void
4545
break;
4646
}
4747
$row = array_combine($headers, $data);
48+
if ($row === false) {
49+
throw new RuntimeException('Malformed CSV data: header/data length mismatch.');
50+
}
51+
4852
$admin = $adminRepository->find($row['owner']);
4953
$template = $templateRepository->find($row['template']);
5054

tests/Integration/Messaging/Fixtures/TemplateFixture.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public function load(ObjectManager $manager): void
3535
break;
3636
}
3737
$row = array_combine($headers, $data);
38+
if ($row === false) {
39+
throw new RuntimeException('Malformed CSV data: header/data length mismatch.');
40+
}
3841

3942
$template = new Template($row['title']);
4043
$template->setContent($row['template']);

tests/Integration/Subscription/Controller/SubscribePageControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public function testCreateSubscribePageWithoutSessionReturnsForbidden(): void
7979

8080
public function testCreateSubscribePageWithSessionCreatesPage(): void
8181
{
82+
$this->loadFixtures([AdministratorFixture::class, SubscribePageFixture::class]);
8283
$payload = json_encode([
8384
'title' => '[email protected]',
8485
'active' => true,

0 commit comments

Comments
 (0)