Skip to content

Conversation

@abnegate
Copy link
Member

@abnegate abnegate commented Oct 16, 2025

Summary by CodeRabbit

  • Tests
    • Added comprehensive end-to-end coverage for querying by relationship document IDs across one-to-one, many-to-one, one-to-many, and many-to-many relationships.
    • Validates both directions of lookups (parent by child ID and child by parent ID), including multiple-ID filters, inverse queries, and cleanup scenarios.
    • Improves confidence in relationship query behavior and stability without changing user-facing functionality.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Adds a new end-to-end test method that creates collections and relationships (MANY_TO_ONE, ONE_TO_ONE, MANY_TO_MANY), seeds documents, validates queries by related document IDs in both directions (including multi-ID filters), and cleans up test collections.

Changes

Cohort / File(s) Summary
E2E relationship ID query tests
tests/e2e/Adapter/Scopes/RelationshipTests.php
Added public function testQueryByRelationshipId(): void which creates collections and relationships, inserts sample documents across users/posts/profiles/tags, executes parent-by-child and child-by-parent ID queries (including IN/multi-ID checks) for M2O, O2O, and M2M, verifies results, and drops test collections.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Test as Test Runner
  participant S as Scope/Adapter
  participant DB as Storage

  rect rgb(240,248,255)
    note over Test,S: Setup collections & relationships
    Test->>S: create collections & define M2O/O2O/M2M
    S->>DB: persist schemas
    DB-->>S: schema IDs
    Test->>S: insert sample documents
    S->>DB: persist documents
    DB-->>S: return document IDs
  end

  rect rgb(245,255,240)
    note over Test,S: Relationship-ID queries
    Test->>S: query parent by childId (M2O/O2O)
    S->>DB: filter parent.relField == childId
    DB-->>S: parent results

    Test->>S: query child by parentId (inverse)
    S->>DB: filter child.relField == parentId
    DB-->>S: child results

    Test->>S: multi-ID (IN) queries
    S->>DB: apply IN filters on relationship fields
    DB-->>S: matched documents

    Note over S,DB: Repeat analogous steps for MANY_TO_MANY (joins/lookup)
  end

  rect rgb(255,248,240)
    note over Test,S: Cleanup
    Test->>S: drop test collections
    S->>DB: delete schemas & data
    DB-->>S: cleanup complete
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ArnabChatterjee20k

Poem

I hop through docs and IDs bright,
Linking nodes from left to right.
One-to-one and many more,
Tests that knock on every door.
Carrots for the passing run—hooray! 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly summarizes the addition of a new test for querying by related IDs, directly matching the primary change of introducing the testQueryByRelationshipId method in the pull request. It is clear, concise, and focused on the main purpose of the update without superfluous detail.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-rel-id-test

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cdf2310 and ac657c3.

📒 Files selected for processing (1)
  • tests/e2e/Adapter/Scopes/RelationshipTests.php (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/e2e/Adapter/Scopes/RelationshipTests.php (6)
src/Database/Database.php (1)
  • Database (37-8144)
src/Database/Adapter.php (1)
  • getSupportForRelationships (992-992)
src/Database/Document.php (2)
  • Document (12-470)
  • getId (63-66)
src/Database/Helpers/Permission.php (2)
  • Permission (9-264)
  • read (186-195)
src/Database/Helpers/Role.php (2)
  • Role (5-178)
  • any (159-162)
src/Database/Query.php (2)
  • Query (8-1116)
  • equal (435-438)
🪛 PHPMD (2.15.0)
tests/e2e/Adapter/Scopes/RelationshipTests.php

3284-3284: Avoid unused local variables such as '$user1'. (undefined)

(UnusedLocalVariable)


3293-3293: Avoid unused local variables such as '$user2'. (undefined)

(UnusedLocalVariable)


3381-3381: Avoid unused local variables such as '$userOto1'. (undefined)

(UnusedLocalVariable)


3434-3434: Avoid unused local variables such as '$dev1'. (undefined)

(UnusedLocalVariable)


3443-3443: Avoid unused local variables such as '$dev2'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Adapter Tests (SharedTables/MariaDB)
  • GitHub Check: Adapter Tests (SharedTables/Postgres)
  • GitHub Check: Adapter Tests (SQLite)
  • GitHub Check: Adapter Tests (Mirror)
  • GitHub Check: Adapter Tests (SharedTables/SQLite)
  • GitHub Check: Adapter Tests (Pool)
  • GitHub Check: Adapter Tests (SharedTables/MySQL)
  • GitHub Check: Adapter Tests (Postgres)
  • GitHub Check: Adapter Tests (MySQL)
  • GitHub Check: Adapter Tests (MariaDB)
  • GitHub Check: Unit Test
🔇 Additional comments (1)
tests/e2e/Adapter/Scopes/RelationshipTests.php (1)

3255-3499: Comprehensive test coverage for querying by relationship $id

The test logic is solid and thoroughly validates the feature across all relationship types:

  • ✅ MANY_TO_ONE: Queries posts by user.$id and inverse
  • ✅ ONE_TO_ONE: Queries profiles by user.$id and inverse
  • ✅ MANY_TO_MANY: Queries projects by developer.$id and inverse
  • ✅ Multiple ID filtering tested (line 3349-3352)
  • ✅ Proper collection setup and cleanup

The test provides excellent end-to-end validation of the relationship $id query functionality.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 35c978d and cdf2310.

📒 Files selected for processing (1)
  • tests/e2e/Adapter/Scopes/RelationshipTests.php (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/e2e/Adapter/Scopes/RelationshipTests.php (6)
src/Database/Database.php (4)
  • getAdapter (1199-1202)
  • Database (37-8134)
  • createRelationship (2656-2833)
  • find (6695-6826)
src/Database/Adapter.php (3)
  • getSupportForRelationships (992-992)
  • createRelationship (615-615)
  • find (802-802)
src/Database/Adapter/Pool.php (3)
  • getSupportForRelationships (378-381)
  • createRelationship (193-196)
  • find (263-266)
src/Database/Helpers/Permission.php (3)
  • Permission (9-264)
  • read (186-195)
  • update (220-229)
src/Database/Helpers/Role.php (2)
  • Role (5-178)
  • any (159-162)
src/Database/Query.php (2)
  • Query (8-1116)
  • equal (435-438)
🪛 PHPMD (2.15.0)
tests/e2e/Adapter/Scopes/RelationshipTests.php

3284-3284: Avoid unused local variables such as '$user1'. (undefined)

(UnusedLocalVariable)


3293-3293: Avoid unused local variables such as '$user2'. (undefined)

(UnusedLocalVariable)


3381-3381: Avoid unused local variables such as '$userOto1'. (undefined)

(UnusedLocalVariable)


3434-3434: Avoid unused local variables such as '$dev1'. (undefined)

(UnusedLocalVariable)


3443-3443: Avoid unused local variables such as '$dev2'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Setup & Build Docker Image

Comment on lines +3284 to +3444
$user1 = $database->createDocument('usersRelId', new Document([
'$id' => 'user1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'name' => 'Alice',
]));

$user2 = $database->createDocument('usersRelId', new Document([
'$id' => 'user2',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'name' => 'Bob',
]));

// Create posts related to users
$database->createDocument('postsRelId', new Document([
'$id' => 'post1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Alice Post 1',
'user' => 'user1',
]));

$database->createDocument('postsRelId', new Document([
'$id' => 'post2',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Alice Post 2',
'user' => 'user1',
]));

$database->createDocument('postsRelId', new Document([
'$id' => 'post3',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Bob Post',
'user' => 'user2',
]));

// Query posts by user.$id - this is the key test
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user1']),
]);
$this->assertCount(2, $posts);
$this->assertEquals('post1', $posts[0]->getId());
$this->assertEquals('post2', $posts[1]->getId());

// Query posts by different user.$id
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user2']),
]);
$this->assertCount(1, $posts);
$this->assertEquals('post3', $posts[0]->getId());

// Query posts by multiple user.$id values
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user1', 'user2']),
]);
$this->assertCount(3, $posts);

// Query users by posts.$id (inverse direction)
$users = $database->find('usersRelId', [
Query::equal('posts.$id', ['post1']),
]);
$this->assertCount(1, $users);
$this->assertEquals('user1', $users[0]->getId());

// Clean up MANY_TO_ONE test
$database->deleteCollection('usersRelId');
$database->deleteCollection('postsRelId');

// Test ONE_TO_ONE relationship - query profile by user.$id
$database->createCollection('usersOtoId');
$database->createCollection('profilesOtoId');

$database->createAttribute('usersOtoId', 'username', Database::VAR_STRING, 255, true);
$database->createAttribute('profilesOtoId', 'bio', Database::VAR_STRING, 255, true);

$database->createRelationship(
collection: 'usersOtoId',
relatedCollection: 'profilesOtoId',
type: Database::RELATION_ONE_TO_ONE,
twoWay: true,
id: 'profile',
twoWayKey: 'user'
);

$userOto1 = $database->createDocument('usersOtoId', new Document([
'$id' => 'userOto1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'username' => 'alice',
]));

$database->createDocument('profilesOtoId', new Document([
'$id' => 'profileOto1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'bio' => 'Software Engineer',
'user' => 'userOto1',
]));

// Query profiles by user.$id
$profiles = $database->find('profilesOtoId', [
Query::equal('user.$id', ['userOto1']),
]);
$this->assertCount(1, $profiles);
$this->assertEquals('profileOto1', $profiles[0]->getId());

// Query users by profile.$id (inverse)
$users = $database->find('usersOtoId', [
Query::equal('profile.$id', ['profileOto1']),
]);
$this->assertCount(1, $users);
$this->assertEquals('userOto1', $users[0]->getId());

// Clean up ONE_TO_ONE test
$database->deleteCollection('usersOtoId');
$database->deleteCollection('profilesOtoId');

// Test MANY_TO_MANY relationship - query projects by developer.$id
$database->createCollection('developersMtmId');
$database->createCollection('projectsMtmId');

$database->createAttribute('developersMtmId', 'devName', Database::VAR_STRING, 255, true);
$database->createAttribute('projectsMtmId', 'projectName', Database::VAR_STRING, 255, true);

$database->createRelationship(
collection: 'developersMtmId',
relatedCollection: 'projectsMtmId',
type: Database::RELATION_MANY_TO_MANY,
twoWay: true,
id: 'projects',
twoWayKey: 'developers'
);

$dev1 = $database->createDocument('developersMtmId', new Document([
'$id' => 'dev1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'devName' => 'Alice',
]));

$dev2 = $database->createDocument('developersMtmId', new Document([
'$id' => 'dev2',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Remove unused document variables to satisfy PHPMD

$user1, $user2, $userOto1, $dev1, and $dev2 are assigned but never read, which triggers PHPMD’s UnusedLocalVariable rule (see static-analysis hint). Dropping the assignments keeps the setup unchanged while clearing the warning.

-        $user1 = $database->createDocument('usersRelId', new Document([
+        $database->createDocument('usersRelId', new Document([
@@
-        $user2 = $database->createDocument('usersRelId', new Document([
+        $database->createDocument('usersRelId', new Document([
@@
-        $userOto1 = $database->createDocument('usersOtoId', new Document([
+        $database->createDocument('usersOtoId', new Document([
@@
-        $dev1 = $database->createDocument('developersMtmId', new Document([
+        $database->createDocument('developersMtmId', new Document([
@@
-        $dev2 = $database->createDocument('developersMtmId', new Document([
+        $database->createDocument('developersMtmId', new Document([
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$user1 = $database->createDocument('usersRelId', new Document([
'$id' => 'user1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'name' => 'Alice',
]));
$user2 = $database->createDocument('usersRelId', new Document([
'$id' => 'user2',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'name' => 'Bob',
]));
// Create posts related to users
$database->createDocument('postsRelId', new Document([
'$id' => 'post1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Alice Post 1',
'user' => 'user1',
]));
$database->createDocument('postsRelId', new Document([
'$id' => 'post2',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Alice Post 2',
'user' => 'user1',
]));
$database->createDocument('postsRelId', new Document([
'$id' => 'post3',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Bob Post',
'user' => 'user2',
]));
// Query posts by user.$id - this is the key test
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user1']),
]);
$this->assertCount(2, $posts);
$this->assertEquals('post1', $posts[0]->getId());
$this->assertEquals('post2', $posts[1]->getId());
// Query posts by different user.$id
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user2']),
]);
$this->assertCount(1, $posts);
$this->assertEquals('post3', $posts[0]->getId());
// Query posts by multiple user.$id values
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user1', 'user2']),
]);
$this->assertCount(3, $posts);
// Query users by posts.$id (inverse direction)
$users = $database->find('usersRelId', [
Query::equal('posts.$id', ['post1']),
]);
$this->assertCount(1, $users);
$this->assertEquals('user1', $users[0]->getId());
// Clean up MANY_TO_ONE test
$database->deleteCollection('usersRelId');
$database->deleteCollection('postsRelId');
// Test ONE_TO_ONE relationship - query profile by user.$id
$database->createCollection('usersOtoId');
$database->createCollection('profilesOtoId');
$database->createAttribute('usersOtoId', 'username', Database::VAR_STRING, 255, true);
$database->createAttribute('profilesOtoId', 'bio', Database::VAR_STRING, 255, true);
$database->createRelationship(
collection: 'usersOtoId',
relatedCollection: 'profilesOtoId',
type: Database::RELATION_ONE_TO_ONE,
twoWay: true,
id: 'profile',
twoWayKey: 'user'
);
$userOto1 = $database->createDocument('usersOtoId', new Document([
'$id' => 'userOto1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'username' => 'alice',
]));
$database->createDocument('profilesOtoId', new Document([
'$id' => 'profileOto1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'bio' => 'Software Engineer',
'user' => 'userOto1',
]));
// Query profiles by user.$id
$profiles = $database->find('profilesOtoId', [
Query::equal('user.$id', ['userOto1']),
]);
$this->assertCount(1, $profiles);
$this->assertEquals('profileOto1', $profiles[0]->getId());
// Query users by profile.$id (inverse)
$users = $database->find('usersOtoId', [
Query::equal('profile.$id', ['profileOto1']),
]);
$this->assertCount(1, $users);
$this->assertEquals('userOto1', $users[0]->getId());
// Clean up ONE_TO_ONE test
$database->deleteCollection('usersOtoId');
$database->deleteCollection('profilesOtoId');
// Test MANY_TO_MANY relationship - query projects by developer.$id
$database->createCollection('developersMtmId');
$database->createCollection('projectsMtmId');
$database->createAttribute('developersMtmId', 'devName', Database::VAR_STRING, 255, true);
$database->createAttribute('projectsMtmId', 'projectName', Database::VAR_STRING, 255, true);
$database->createRelationship(
collection: 'developersMtmId',
relatedCollection: 'projectsMtmId',
type: Database::RELATION_MANY_TO_MANY,
twoWay: true,
id: 'projects',
twoWayKey: 'developers'
);
$dev1 = $database->createDocument('developersMtmId', new Document([
'$id' => 'dev1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'devName' => 'Alice',
]));
$dev2 = $database->createDocument('developersMtmId', new Document([
'$id' => 'dev2',
$database->createDocument('usersRelId', new Document([
'$id' => 'user1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'name' => 'Alice',
]));
$database->createDocument('usersRelId', new Document([
'$id' => 'user2',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'name' => 'Bob',
]));
// Create posts related to users
$database->createDocument('postsRelId', new Document([
'$id' => 'post1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Alice Post 1',
'user' => 'user1',
]));
$database->createDocument('postsRelId', new Document([
'$id' => 'post2',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Alice Post 2',
'user' => 'user1',
]));
$database->createDocument('postsRelId', new Document([
'$id' => 'post3',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'title' => 'Bob Post',
'user' => 'user2',
]));
// Query posts by user.$id - this is the key test
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user1']),
]);
$this->assertCount(2, $posts);
$this->assertEquals('post1', $posts[0]->getId());
$this->assertEquals('post2', $posts[1]->getId());
// Query posts by different user.$id
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user2']),
]);
$this->assertCount(1, $posts);
$this->assertEquals('post3', $posts[0]->getId());
// Query posts by multiple user.$id values
$posts = $database->find('postsRelId', [
Query::equal('user.$id', ['user1', 'user2']),
]);
$this->assertCount(3, $posts);
// Query users by posts.$id (inverse direction)
$users = $database->find('usersRelId', [
Query::equal('posts.$id', ['post1']),
]);
$this->assertCount(1, $users);
$this->assertEquals('user1', $users[0]->getId());
// Clean up MANY_TO_ONE test
$database->deleteCollection('usersRelId');
$database->deleteCollection('postsRelId');
// Test ONE_TO_ONE relationship - query profile by user.$id
$database->createCollection('usersOtoId');
$database->createCollection('profilesOtoId');
$database->createAttribute('usersOtoId', 'username', Database::VAR_STRING, 255, true);
$database->createAttribute('profilesOtoId', 'bio', Database::VAR_STRING, 255, true);
$database->createRelationship(
collection: 'usersOtoId',
relatedCollection: 'profilesOtoId',
type: Database::RELATION_ONE_TO_ONE,
twoWay: true,
id: 'profile',
twoWayKey: 'user'
);
$database->createDocument('usersOtoId', new Document([
'$id' => 'userOto1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'username' => 'alice',
]));
$database->createDocument('profilesOtoId', new Document([
'$id' => 'profileOto1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'bio' => 'Software Engineer',
'user' => 'userOto1',
]));
// Query profiles by user.$id
$profiles = $database->find('profilesOtoId', [
Query::equal('user.$id', ['userOto1']),
]);
$this->assertCount(1, $profiles);
$this->assertEquals('profileOto1', $profiles[0]->getId());
// Query users by profile.$id (inverse)
$users = $database->find('usersOtoId', [
Query::equal('profile.$id', ['profileOto1']),
]);
$this->assertCount(1, $users);
$this->assertEquals('userOto1', $users[0]->getId());
// Clean up ONE_TO_ONE test
$database->deleteCollection('usersOtoId');
$database->deleteCollection('profilesOtoId');
// Test MANY_TO_MANY relationship - query projects by developer.$id
$database->createCollection('developersMtmId');
$database->createCollection('projectsMtmId');
$database->createAttribute('developersMtmId', 'devName', Database::VAR_STRING, 255, true);
$database->createAttribute('projectsMtmId', 'projectName', Database::VAR_STRING, 255, true);
$database->createRelationship(
collection: 'developersMtmId',
relatedCollection: 'projectsMtmId',
type: Database::RELATION_MANY_TO_MANY,
twoWay: true,
id: 'projects',
twoWayKey: 'developers'
);
$database->createDocument('developersMtmId', new Document([
'$id' => 'dev1',
'$permissions' => [
Permission::read(Role::any()),
Permission::update(Role::any()),
],
'devName' => 'Alice',
]));
$database->createDocument('developersMtmId', new Document([
'$id' => 'dev2',
🧰 Tools
🪛 PHPMD (2.15.0)

3284-3284: Avoid unused local variables such as '$user1'. (undefined)

(UnusedLocalVariable)


3293-3293: Avoid unused local variables such as '$user2'. (undefined)

(UnusedLocalVariable)


3381-3381: Avoid unused local variables such as '$userOto1'. (undefined)

(UnusedLocalVariable)


3434-3434: Avoid unused local variables such as '$dev1'. (undefined)

(UnusedLocalVariable)


3443-3443: Avoid unused local variables such as '$dev2'. (undefined)

(UnusedLocalVariable)

🤖 Prompt for AI Agents
In tests/e2e/Adapter/Scopes/RelationshipTests.php around lines 3284 to 3444,
several Document creations assign their return values to unused local variables
($user1, $user2, $userOto1, $dev1, $dev2) which tripped PHPMD’s
UnusedLocalVariable rule; remove the unused assignments by calling
$database->createDocument(...) without assigning its result for those entries
(leave other variables that are actually used unchanged) so the setup behavior
is identical but the unused-variable warnings are eliminated.

@abnegate abnegate merged commit 1ce7ffc into main Oct 16, 2025
15 checks passed
@abnegate abnegate deleted the feat-rel-id-test branch October 16, 2025 05:01
@coderabbitai coderabbitai bot mentioned this pull request Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants