Skip to content

Conversation

@capcom6
Copy link
Member

@capcom6 capcom6 commented May 31, 2025

Summary by CodeRabbit

  • New Features

    • Introduced builder patterns for creating messages and settings, enabling more flexible and readable object construction.
    • Added support for device management, system health checks, message inbox export, log retrieval, user settings management, and webhook management.
    • Expanded message options with priority and validity period fields.
    • Added support for webhook event types.
  • Documentation

    • Updated usage instructions to demonstrate the new builder patterns and reflect updated method names and API structure.
    • Improved API method categorization and descriptions for clarity.
    • Completely overhauled README into a comprehensive, structured manual including features, prerequisites, security best practices, API reference, and contribution guidelines.
  • Bug Fixes

    • Enforced validation to prevent setting mutually exclusive message parameters.
  • Tests

    • Added comprehensive tests for new client features, message and settings builders, and updated existing tests to match the new API.

@coderabbitai coderabbitai bot changed the title @coderabbitai Enhance Android SMS Gateway PHP client with new entities and API methods May 31, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 31, 2025

Walkthrough

This update introduces extensive enhancements to the Android SMS Gateway PHP client. It adds new domain entities, builder classes for Message and Settings, and a comprehensive enumeration for webhook events. The Client class is expanded with new API methods for device, system, settings, logs, and webhook management, and deprecated methods are replaced. Tests and documentation are updated to reflect these changes.

Changes

File(s) Change Summary
README.md Usage examples updated to use builder patterns; method names updated; API methods reorganized and expanded.
src/Client.php Added new public API methods for devices, system, settings, logs, webhooks; deprecated old methods; updated signatures.
src/Domain/Message.php Added priority and validUntil properties; updated constructor and serialization logic; validation for TTL and validUntil.
src/Domain/MessageBuilder.php New builder class for Message objects with fluent setters and validation.
src/Domain/Device.php
src/Domain/LogEntry.php
src/Domain/MessagesExportRequest.php
src/Domain/Settings.php
src/Domain/Webhook.php
New domain classes for device, log entry, message export request, settings, and webhook entities.
src/Domain/SettingsBuilder.php New builder class for Settings objects with fluent setters.
src/Enums/WebhookEvent.php New enum-like class for webhook event types with validation and factory methods.
src/Domain/RecipientState.php PHPDoc updated to clarify $phoneNumber can be a hash; no logic changes.
tests/ClientTest.php Test methods renamed and expanded to cover all new client API methods; imports updated.
tests/Domain/MessageBuilderTest.php New tests for MessageBuilder covering minimal, full, invalid, and chaining cases.
tests/Domain/SettingsBuilderTest.php New test for SettingsBuilder with minimal parameters.
tests/Domain/MessageTest.php Assertion updated to check isEncrypted instead of ttl being null.
tests/EncryptorTest.php Added namespace declaration for the test class.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Client
    participant Server

    User->>Client: Build Message via MessageBuilder
    User->>Client: SendMessage(message)
    Client->>Server: POST /3rdparty/v1/messages
    Server-->>Client: MessageState
    Client-->>User: MessageState

    User->>Client: ListDevices()
    Client->>Server: GET /3rdparty/v1/devices
    Server-->>Client: [Device, ...]
    Client-->>User: [Device, ...]

    User->>Client: GetLogs(from, to)
    Client->>Server: GET /3rdparty/v1/logs?from=...&to=...
    Server-->>Client: [LogEntry, ...]
    Client-->>User: [LogEntry, ...]

    User->>Client: RegisterWebhook(webhook)
    Client->>Server: POST /3rdparty/v1/webhooks
    Server-->>Client: Webhook
    Client-->>User: Webhook
Loading
sequenceDiagram
    participant User
    participant SettingsBuilder
    participant Client
    participant Server

    User->>SettingsBuilder: setEncryption(...), setGateway(...), ...
    User->>SettingsBuilder: build()
    SettingsBuilder-->>User: Settings
    User->>Client: UpdateSettings(settings)
    Client->>Server: PUT /3rdparty/v1/settings
    Server-->>Client: object
    Client-->>User: object
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 2

🧹 Nitpick comments (8)
tests/Domain/SettingsBuilderTest.php (1)

9-16: Consider expanding test coverage for the builder pattern.

While the current test verifies basic builder functionality, consider adding tests for:

  • Building with individual setter methods
  • Method chaining verification
  • Building with all possible parameters set
  • Edge cases and validation

Example additional test:

public function testBuildWithAllParameters(): void {
    $settings = (new SettingsBuilder())
        ->withEncryption((object)['enabled' => true])
        ->withGateway((object)['host' => 'example.com'])
        ->build();
    
    $this->assertInstanceOf(Settings::class, $settings);
    $obj = $settings->ToObject();
    $this->assertObjectHasProperty('encryption', $obj);
    $this->assertObjectHasProperty('gateway', $obj);
}
src/Domain/Settings.php (1)

10-63: LGTM! Well-structured domain class with room for type safety improvements.

The Settings class follows good domain modeling patterns with proper serialization support and clean constructor design. The conditional property inclusion in ToObject() is efficient for API payloads.

Consider these improvements for better type safety and usability:

  1. Add getter methods for property access:
public function getEncryption(): ?object { return $this->encryption; }
public function getGateway(): ?object { return $this->gateway; }
// ... etc
  1. Consider more specific types instead of generic object:
private ?EncryptionSettings $encryption;
private ?GatewaySettings $gateway;
  1. Add validation in constructor or setters if the objects have expected structure.
README.md (1)

67-95: Well-organized API documentation structure.

The categorization of client methods into logical groups (Message, Device, System, Settings, Webhook) makes the API much more discoverable and easier to navigate. The deprecation notices for old methods are clearly marked.

Minor formatting inconsistency: Consider using consistent list formatting throughout. The static analysis suggests using dashes instead of asterisks for unordered lists, but this is a minor stylistic choice.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~70-~70: Loose punctuation mark.
Context: ...ssage. * SendMessage(Message $message): Send a new SMS message. * `GetState(str...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~72-~72: Loose punctuation mark.
Context: ... its ID. * GetMessageState(string $id): Retrieve the state of a previously sent...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~76-~76: Loose punctuation mark.
Context: .... ### Device Methods * ListDevices(): List all registered devices. * `RemoveD...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~77-~77: Loose punctuation mark.
Context: ...ed devices. * RemoveDevice(string $id): Remove a device by ID. ### System Meth...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~81-~81: Loose punctuation mark.
Context: .... ### System Methods * HealthCheck(): Check system health. * `RequestInboxExp...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~82-~82: Loose punctuation mark.
Context: ... * RequestInboxExport(object $request): Request inbox messages export. * `GetLo...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...tring $from = null, ?string $to = null)`: Get logs within a specified time range....

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~87-~87: Loose punctuation mark.
Context: ... ### Settings Methods * GetSettings(): Get user settings. * `UpdateSettings(ob...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~88-~88: Loose punctuation mark.
Context: ...gs. * UpdateSettings(object $settings): Update user settings. * `PatchSettings(...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~89-~89: Loose punctuation mark.
Context: ...ngs. * PatchSettings(object $settings): Partially update user settings. ### We...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~93-~93: Loose punctuation mark.
Context: ... ### Webhook Methods * ListWebhooks(): List all registered webhooks. * `Regist...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~94-~94: Loose punctuation mark.
Context: ...ks. * RegisterWebhook(object $webhook): Register a new webhook. * `DeleteWebhoo...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~95-~95: Loose punctuation mark.
Context: ...w webhook. * DeleteWebhook(string $id): Delete a webhook by ID. # Contributing...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)

69-69: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


70-70: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


71-71: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


72-72: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


76-76: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


77-77: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


81-81: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


82-82: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


83-83: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


87-87: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


88-88: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


89-89: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


93-93: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


94-94: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


95-95: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

src/Domain/MessagesExportRequest.php (1)

10-58: Clean domain class implementation following established patterns.

The class correctly implements SerializableInterface with proper constructor, factory method, and serialization. The structure is consistent with other domain classes in the codebase.

Consider adding input validation for date format and device ID if these have specific requirements:

 public function __construct(string $deviceId, string $since, string $until) {
+    if (empty($deviceId)) {
+        throw new \InvalidArgumentException('Device ID cannot be empty');
+    }
     $this->deviceId = $deviceId;
     $this->since = $since;
     $this->until = $until;
 }
src/Domain/SettingsBuilder.php (1)

5-5: Remove unused import.

The InvalidArgumentException import is not used in this class.

-use InvalidArgumentException;
src/Domain/MessageBuilder.php (1)

36-36: Remove extra blank line.

There's an unnecessary blank line that should be removed for consistency.

 private bool $withDeliveryReport = true;
-

 /**
src/Enums/WebhookEvent.php (1)

12-20: Consider moving the _ALL_ constant to the top of the class for better readability.

While PHP allows forward references to class constants, it's more conventional and clearer to define constants before they're used. This improves code readability and makes the validation logic easier to follow.

 final class WebhookEvent {
     public const SMS_RECEIVED = 'sms:received';
     public const SMS_SENT = 'sms:sent';
     public const SMS_DELIVERED = 'sms:delivered';
     public const SMS_FAILED = 'sms:failed';
     public const SYSTEM_PING = 'system:ping';
 
+    private const _ALL_ = [
+        self::SMS_RECEIVED,
+        self::SMS_SENT,
+        self::SMS_DELIVERED,
+        self::SMS_FAILED,
+        self::SYSTEM_PING,
+    ];
+
     private string $value;
 
     private function __construct(string $value) {

And remove the constant definition from lines 54-60.

Also applies to: 54-60

tests/ClientTest.php (1)

303-305: Remove unnecessary empty line.

     public function testPatchSettings(): void {
-
-
         $settings = new Settings(
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c73ad6 and 49aa0e9.

📒 Files selected for processing (16)
  • README.md (2 hunks)
  • src/Client.php (4 hunks)
  • src/Domain/Device.php (1 hunks)
  • src/Domain/LogEntry.php (1 hunks)
  • src/Domain/Message.php (3 hunks)
  • src/Domain/MessageBuilder.php (1 hunks)
  • src/Domain/MessagesExportRequest.php (1 hunks)
  • src/Domain/RecipientState.php (1 hunks)
  • src/Domain/Settings.php (1 hunks)
  • src/Domain/SettingsBuilder.php (1 hunks)
  • src/Domain/Webhook.php (1 hunks)
  • src/Enums/WebhookEvent.php (1 hunks)
  • tests/ClientTest.php (7 hunks)
  • tests/Domain/MessageBuilderTest.php (1 hunks)
  • tests/Domain/MessageTest.php (1 hunks)
  • tests/Domain/SettingsBuilderTest.php (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
tests/Domain/MessageBuilderTest.php (1)
src/Domain/MessageBuilder.php (8)
  • MessageBuilder (10-170)
  • build (154-169)
  • setId (67-70)
  • setTtl (89-92)
  • setSimNumber (100-103)
  • setWithDeliveryReport (111-114)
  • setPriority (132-135)
  • setValidUntil (143-146)
src/Enums/WebhookEvent.php (1)
src/Domain/Webhook.php (1)
  • __construct (38-48)
src/Client.php (7)
src/Domain/Device.php (2)
  • Device (10-149)
  • FromObject (69-78)
src/Domain/LogEntry.php (3)
  • LogEntry (10-140)
  • Message (109-111)
  • FromObject (69-78)
src/Domain/Webhook.php (2)
  • Webhook (11-110)
  • FromObject (54-61)
src/Domain/MessagesExportRequest.php (2)
  • MessagesExportRequest (10-59)
  • FromObject (41-47)
src/Domain/Settings.php (2)
  • Settings (10-112)
  • FromObject (69-78)
src/Domain/Message.php (2)
  • Message (11-118)
  • Encrypt (80-92)
src/Domain/MessageState.php (2)
  • MessageState (11-120)
  • FromObject (108-119)
🪛 LanguageTool
README.md

[uncategorized] ~70-~70: Loose punctuation mark.
Context: ...ssage. * SendMessage(Message $message): Send a new SMS message. * `GetState(str...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~72-~72: Loose punctuation mark.
Context: ... its ID. * GetMessageState(string $id): Retrieve the state of a previously sent...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~76-~76: Loose punctuation mark.
Context: .... ### Device Methods * ListDevices(): List all registered devices. * `RemoveD...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~77-~77: Loose punctuation mark.
Context: ...ed devices. * RemoveDevice(string $id): Remove a device by ID. ### System Meth...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~81-~81: Loose punctuation mark.
Context: .... ### System Methods * HealthCheck(): Check system health. * `RequestInboxExp...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~82-~82: Loose punctuation mark.
Context: ... * RequestInboxExport(object $request): Request inbox messages export. * `GetLo...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...tring $from = null, ?string $to = null)`: Get logs within a specified time range....

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~87-~87: Loose punctuation mark.
Context: ... ### Settings Methods * GetSettings(): Get user settings. * `UpdateSettings(ob...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~88-~88: Loose punctuation mark.
Context: ...gs. * UpdateSettings(object $settings): Update user settings. * `PatchSettings(...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~89-~89: Loose punctuation mark.
Context: ...ngs. * PatchSettings(object $settings): Partially update user settings. ### We...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~93-~93: Loose punctuation mark.
Context: ... ### Webhook Methods * ListWebhooks(): List all registered webhooks. * `Regist...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~94-~94: Loose punctuation mark.
Context: ...ks. * RegisterWebhook(object $webhook): Register a new webhook. * `DeleteWebhoo...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~95-~95: Loose punctuation mark.
Context: ...w webhook. * DeleteWebhook(string $id): Delete a webhook by ID. # Contributing...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
README.md

69-69: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


70-70: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


71-71: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


72-72: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


76-76: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


77-77: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


81-81: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


82-82: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


83-83: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


87-87: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


88-88: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


89-89: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


93-93: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


94-94: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


95-95: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

🪛 GitHub Check: build-test (8.0)
src/Domain/LogEntry.php

[failure] 55-55:
Deprecated in PHP 8.1: Required parameter $createdAt follows optional parameter $context.

tests/ClientTest.php

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 GitHub Check: build-test (8.1)
src/Domain/LogEntry.php

[failure] 55-55:
Deprecated in PHP 8.1: Required parameter $createdAt follows optional parameter $context.

tests/ClientTest.php

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 GitHub Check: build-test (7.4)
src/Domain/LogEntry.php

[failure] 55-55:
Deprecated in PHP 8.1: Required parameter $createdAt follows optional parameter $context.

tests/ClientTest.php

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🔇 Additional comments (22)
src/Domain/RecipientState.php (1)

13-13: LGTM! Documentation enhancement improves clarity.

The clarification that the phone number property can hold either the actual phone number or its hash accurately reflects the class's functionality, especially considering the Decrypt method. This improves API documentation clarity.

tests/Domain/MessageTest.php (1)

54-54:

Details

✅ Verification successful

Verify alignment with Message class implementation.

The change from testing ttl to isEncrypted reflects the evolution of the Message domain model to include encryption state tracking. The assertion that messages are not encrypted by default is reasonable.

Please verify that the Message class's ToObject() method now includes the isEncrypted property and that this change doesn't break existing functionality:


🏁 Script executed:

#!/bin/bash
# Description: Verify Message class ToObject method includes isEncrypted property
# Expected: Find ToObject method implementation with isEncrypted property

ast-grep --pattern 'class Message {
  $$$
  public function ToObject() {
    $$$
  }
  $$$
}'

Length of output: 95


🏁 Script executed:

#!/bin/bash
# Locate Message class definition
echo "=== class Message definitions ==="
rg -n "^\s*class\s\+Message\b"

# Locate ToObject method
echo "=== ToObject method definitions ==="
rg -n "function\s\+ToObject\b"

# Search for isEncrypted occurrences
echo "=== isEncrypted occurrences ==="
rg -n "isEncrypted"

Length of output: 1302


Confirmed: Message class ToObject() includes isEncrypted property

The ToObject() method in src/Domain/Message.php maps $this->isEncrypted to 'isEncrypted' (around line 100), and the default value is set to false (line 37). This aligns with the new test assertion that messages are not encrypted by default.

No further changes required.

src/Domain/Settings.php (2)

83-111: Efficient serialization implementation.

The ToObject() method efficiently handles conditional property inclusion, avoiding null properties in the serialized output. This is good for API payload optimization.


69-78: Robust deserialization with null coalescing.

The FromObject() method properly handles missing properties using null coalescing, making it resilient to incomplete input data.

README.md (1)

20-44: Excellent documentation of the builder pattern!

The updated usage example clearly demonstrates how to use the new MessageBuilder class with method chaining for optional parameters. This is much more readable and flexible than the previous direct constructor approach.

tests/Domain/MessageBuilderTest.php (1)

1-59: Comprehensive test coverage for MessageBuilder!

The test suite covers all critical aspects:

  • ✅ Minimal parameter building
  • ✅ All optional parameters
  • ✅ Validation logic (ttl/validUntil conflict)
  • ✅ Method chaining behavior

The tests are well-structured with proper assertions and exception handling. This provides good confidence in the MessageBuilder functionality.

src/Domain/Message.php (3)

43-50: Good addition of new properties with proper documentation.

The new priority and validUntil properties are well-documented and follow the existing code style.


65-67: Excellent validation logic!

The mutual exclusivity validation between ttl and validUntil prevents invalid parameter combinations and provides a clear error message.


95-116: Smart conditional serialization approach.

The ToObject method now conditionally includes optional properties only when they have values, which produces cleaner serialized objects and maintains backward compatibility.

src/Domain/LogEntry.php (2)

83-97: Well-implemented conditional serialization.

The conditional inclusion of the context property in the serialized object is a good approach, avoiding unnecessary null values in the output.


99-140: Clean and consistent getter methods.

All getter methods follow consistent naming conventions and provide proper return type declarations.

src/Domain/SettingsBuilder.php (2)

47-105: Excellent builder pattern implementation.

All setter methods consistently return $this enabling fluent interface, and the method signatures are well-documented with proper type hints.


112-121: Clean build method implementation.

The build method correctly instantiates the Settings object with all configured properties.

src/Domain/Webhook.php (3)

38-48: Good constructor parameter ordering.

The constructor properly places required parameters (event, url) before optional ones (id, deviceId), following PHP best practices.


54-61: Excellent enum integration in factory method.

The use of WebhookEvent::FromValue() provides type safety when converting from generic objects, ensuring only valid webhook events are accepted.


66-81: Smart conditional serialization.

The ToObject method only includes optional fields (id, deviceId) when they have values, keeping the serialized output clean and minimal.

src/Domain/MessageBuilder.php (3)

56-59: Smart constructor design.

Requiring the essential parameters (message and phoneNumbers) in the constructor while making everything else optional through setters is a good design choice.


154-169: Excellent validation logic in build method.

The validation preventing simultaneous ttl and validUntil settings makes perfect business sense and provides clear error messaging.


67-146: Consistent fluent interface implementation.

All setter methods properly return $this and follow consistent naming conventions, enabling clean method chaining.

src/Domain/Device.php (1)

1-149: LGTM! Well-structured domain model.

The Device class is well-implemented with:

  • Proper encapsulation and immutability
  • Comprehensive documentation
  • Correct handling of nullable fields in serialization/deserialization
  • Clear getter methods following consistent naming conventions
tests/ClientTest.php (1)

157-157: Consider whether type assertions are necessary given the type hints.

Static analysis indicates that assertions like assertIsObject() and assertIsArray() will always evaluate to true because the client methods already have return type declarations. While these assertions do provide documentation value and protection against future changes, you might consider whether they're necessary.

If you decide to keep them for documentation purposes, consider adding a comment explaining why, or alternatively, test more specific properties of the returned objects/arrays.

Also applies to: 195-195, 219-219, 245-245, 268-268, 299-299, 332-332, 354-354, 379-379

🧰 Tools
🪛 GitHub Check: build-test (8.0)

[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 GitHub Check: build-test (8.1)

[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 GitHub Check: build-test (7.4)

[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

src/Client.php (1)

1-414: Excellent implementation of the expanded client API!

The client enhancements are well-designed:

  • Smooth deprecation path for SendSendMessage and GetStateGetMessageState
  • Consistent implementation pattern across all new methods
  • Proper error handling and type validation
  • Clean integration with domain objects
  • Good support for optional query parameters (e.g., skipPhoneValidation)

The code maintains backward compatibility while significantly expanding the API surface.

Copy link

@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

🧹 Nitpick comments (2)
README.md (1)

118-118: Fix table formatting per markdown standards.

The table needs blank lines before and after it for proper markdown formatting.

+
 | Category     | Method                                | Description              |
 | ------------ | ------------------------------------- | ------------------------ |
 | **Messages** | `SendMessage(Message $message)`       | Send SMS message         |
 |              | `GetMessageState(string $id)`         | Get message status by ID |
 | **Devices**  | `ListDevices()`                       | List registered devices  |
 |              | `RemoveDevice(string $id)`            | Remove device by ID      |
 | **System**   | `HealthCheck()`                       | Check API health status  |
 |              | `GetLogs(?string $from, ?string $to)` | Retrieve system logs     |
 | **Settings** | `GetSettings()`                       | Get account settings     |
 |              | `UpdateSettings(object $settings)`    | Update account settings  |
 | **Webhooks** | `ListWebhooks()`                      | List registered webhooks |
 |              | `RegisterWebhook(object $webhook)`    | Register new webhook     |
 |              | `DeleteWebhook(string $id)`           | Delete webhook by ID     |
+
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

118-118: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)

tests/ClientTest.php (1)

304-304: Remove extra blank lines.

There are unnecessary blank lines in the testPatchSettings method.

     public function testPatchSettings(): void {
-
-
         $settings = new Settings(
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49aa0e9 and 8c2ecde.

📒 Files selected for processing (8)
  • README.md (1 hunks)
  • src/Domain/LogEntry.php (1 hunks)
  • src/Domain/SettingsBuilder.php (1 hunks)
  • src/Enums/WebhookEvent.php (1 hunks)
  • tests/ClientTest.php (7 hunks)
  • tests/Domain/MessageBuilderTest.php (1 hunks)
  • tests/Domain/SettingsBuilderTest.php (1 hunks)
  • tests/EncryptorTest.php (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/EncryptorTest.php
🚧 Files skipped from review as they are similar to previous changes (5)
  • tests/Domain/SettingsBuilderTest.php
  • tests/Domain/MessageBuilderTest.php
  • src/Domain/SettingsBuilder.php
  • src/Domain/LogEntry.php
  • src/Enums/WebhookEvent.php
🧰 Additional context used
🪛 GitHub Check: build-test (8.1)
tests/ClientTest.php

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 GitHub Check: build-test (8.0)
tests/ClientTest.php

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 markdownlint-cli2 (0.17.2)
README.md

118-118: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)

🔇 Additional comments (5)
README.md (2)

1-190: Excellent comprehensive documentation update!

The README has been significantly improved with modern documentation practices, clear examples, and comprehensive API coverage. The structure is well-organized and user-friendly.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

118-118: Tables should be surrounded by blank lines
null

(MD058, blanks-around-tables)


62-88:

Details

✅ Verification successful

Verify the new MessageBuilder class and method names.

The documentation shows usage of MessageBuilder class and renamed methods (SendMessage/GetMessageState). Ensure these align with the actual implementation.


🏁 Script executed:

#!/bin/bash
# Verify MessageBuilder class exists and has the documented methods
ast-grep --pattern 'class MessageBuilder {
  $$$
}'

# Verify Client class has the new method names
ast-grep --pattern 'class Client {
  $$$
  SendMessage($$$) {
    $$$
  }
  $$$
}'

ast-grep --pattern 'class Client {
  $$$
  GetMessageState($$$) {
    $$$
  }
  $$$
}'

Length of output: 8944


🏁 Script executed:

#!/bin/bash
# Locate Client class definition
echo "Locating Client class definitions..."
rg "class Client" -n

# For each file containing Client, list its public methods
for file in $(rg -l "class Client"); do
  echo -e "\nPublic methods in $file:"
  rg "public function" "$file" -n
done

# Search globally for the documented method names
echo -e "\nSearching for SendMessage definitions..."
rg "function SendMessage" -n

echo -e "\nSearching for GetMessageState definitions..."
rg "function GetMessageState" -n

# Also check common camelCase variants
echo -e "\nSearching for sendMessage definitions..."
rg "function sendMessage" -n

echo -e "\nSearching for getMessageState definitions..."
rg "function getMessageState" -n

Length of output: 3065


All documented classes and methods are present and correctly named
The MessageBuilder fluent API and its .build() method exist in src/Domain/MessageBuilder.php, and Client::SendMessage() and Client::GetMessageState() are implemented in src/Client.php exactly as shown in the README. No changes needed.

tests/ClientTest.php (3)

3-3: Approve namespace change.

The namespace change from AndroidSmsGateway\Tests\Domain to AndroidSmsGateway\Tests is appropriate and aligns with the test organization.


38-50: Approve method name updates.

The test method renames (testSendtestSendMessage, testGetStatetestGetMessageState) correctly reflect the API changes in the Client class.

Also applies to: 71-80


139-396: Excellent comprehensive test coverage for new API endpoints.

The new test methods provide thorough coverage of all the new client functionality including device management, health checks, logs, settings, and webhooks.

🧰 Tools
🪛 GitHub Check: build-test (8.1)

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

🪛 GitHub Check: build-test (8.0)

[failure] 379-379:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 354-354:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Webhook> will always evaluate to true.


[failure] 332-332:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 299-299:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 268-268:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 245-245:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\LogEntry> will always evaluate to true.


[failure] 219-219:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 195-195:
Call to method PHPUnit\Framework\Assert::assertIsObject() with object will always evaluate to true.


[failure] 157-157:
Call to method PHPUnit\Framework\Assert::assertIsArray() with array<AndroidSmsGateway\Domain\Device> will always evaluate to true.

@capcom6 capcom6 force-pushed the client/implement-new-methods branch from 43b99ce to dde1428 Compare May 31, 2025 11:38
Copy link

@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: 2

♻️ Duplicate comments (1)
tests/ClientTest.php (1)

157-157: Remove redundant type assertion as noted in past review.

The assertIsArray() call is redundant since ListDevices() has a strongly typed return type that guarantees an array.

-        $this->assertIsArray($devices);
         $this->assertCount(1, $devices);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43b99ce and 7bc6873.

📒 Files selected for processing (17)
  • README.md (1 hunks)
  • src/Client.php (4 hunks)
  • src/Domain/Device.php (1 hunks)
  • src/Domain/LogEntry.php (1 hunks)
  • src/Domain/Message.php (3 hunks)
  • src/Domain/MessageBuilder.php (1 hunks)
  • src/Domain/MessagesExportRequest.php (1 hunks)
  • src/Domain/RecipientState.php (1 hunks)
  • src/Domain/Settings.php (1 hunks)
  • src/Domain/SettingsBuilder.php (1 hunks)
  • src/Domain/Webhook.php (1 hunks)
  • src/Enums/WebhookEvent.php (1 hunks)
  • tests/ClientTest.php (7 hunks)
  • tests/Domain/MessageBuilderTest.php (1 hunks)
  • tests/Domain/MessageTest.php (1 hunks)
  • tests/Domain/SettingsBuilderTest.php (1 hunks)
  • tests/EncryptorTest.php (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/Domain/SettingsBuilderTest.php
🚧 Files skipped from review as they are similar to previous changes (13)
  • src/Domain/RecipientState.php
  • tests/Domain/MessageTest.php
  • tests/EncryptorTest.php
  • tests/Domain/MessageBuilderTest.php
  • src/Domain/MessagesExportRequest.php
  • src/Domain/Settings.php
  • src/Enums/WebhookEvent.php
  • src/Domain/Message.php
  • src/Domain/SettingsBuilder.php
  • src/Domain/Webhook.php
  • src/Domain/LogEntry.php
  • src/Domain/MessageBuilder.php
  • src/Domain/Device.php
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests/ClientTest.php (10)
src/Client.php (14)
  • Client (20-414)
  • SendMessage (72-101)
  • GetMessageState (124-142)
  • ListDevices (150-165)
  • RemoveDevice (173-180)
  • HealthCheck (187-199)
  • RequestInboxExport (207-220)
  • GetLogs (229-253)
  • GetSettings (260-272)
  • ReplaceSettings (280-293)
  • PatchSettings (301-314)
  • ListWebhooks (321-336)
  • RegisterWebhook (344-357)
  • DeleteWebhook (365-372)
src/Domain/Message.php (1)
  • Message (11-118)
src/Domain/LogEntry.php (2)
  • Message (109-111)
  • ID (102-104)
src/Domain/MessagesExportRequest.php (1)
  • MessagesExportRequest (10-59)
src/Domain/MessageState.php (3)
  • MessageState (11-120)
  • State (69-71)
  • ID (61-63)
src/Domain/Settings.php (1)
  • Settings (10-112)
src/Domain/Webhook.php (2)
  • Webhook (11-110)
  • ID (86-88)
src/Enums/ProcessState.php (2)
  • ProcessState (8-84)
  • PENDING (29-31)
src/Enums/WebhookEvent.php (2)
  • WebhookEvent (5-61)
  • SMS_RECEIVED (30-32)
src/Domain/Device.php (1)
  • ID (106-108)
🔇 Additional comments (15)
README.md (3)

119-134: Excellent API reference table structure.

The API reference table provides a clear and organized overview of all client methods, categorized by functionality. This will greatly help developers understand the available endpoints.


162-168: Security-conscious encryption example.

Good inclusion of encryption support example. The code demonstrates proper initialization of the Encryptor class with the client.


62-88:

Details

✅ Verification successful

Verify the code example matches the actual API.

The usage example looks comprehensive and well-structured. However, please verify that the MessageBuilder class and its methods (setTtl, setSimNumber, setWithDeliveryReport, setPriority) are correctly implemented as shown in the example.


🏁 Script executed:

#!/bin/bash
# Verify MessageBuilder class and its methods exist and match the documentation
ast-grep --pattern $'class MessageBuilder {
  $$$
  setTtl($_) {
    $$$
  }
  $$$
  setSimNumber($_) {
    $$$
  }
  $$$
  setWithDeliveryReport($_) {
    $$$
  }
  $$$
  setPriority($_) {
    $$$
  }
  $$$
  build() {
    $$$
  }
  $$$
}'

Length of output: 241


To locate and inspect the actual MessageBuilder implementation, let’s search for its definition and method signatures:


🏁 Script executed:

#!/bin/bash
set -e

# 1. Find where MessageBuilder is defined
rg -n "class MessageBuilder" --color=never

echo "----"

# 2. List the methods we expect from the docs
rg -n "function (setTtl|setSimNumber|setWithDeliveryReport|setPriority|build)" --color=never

Length of output: 823


MessageBuilder API Verified

I’ve confirmed that in src/Domain/MessageBuilder.php the following methods exist with signatures matching the README example:

  • public function setTtl(?int $ttl): self
  • public function setSimNumber(?int $simNumber): self
  • public function setWithDeliveryReport(bool $withDeliveryReport): self
  • public function setPriority(?int $priority): self
  • public function build(): Message

No further changes are needed.

src/Client.php (6)

7-11: Clean import organization for new domain entities.

The new import statements are well-organized and include all the necessary domain classes for the expanded API functionality.


49-63: Proper deprecation implementation.

The deprecation of the Send method is handled correctly with trigger_error and delegation to the new SendMessage method. This maintains backward compatibility while encouraging migration to the new API.


72-101: Robust SendMessage implementation with query parameter support.

The new SendMessage method properly handles the skipPhoneValidation parameter and maintains the existing encryption logic. The query parameter construction is clean and secure.


109-116: Consistent deprecation pattern.

The GetState method deprecation follows the same pattern as Send, maintaining consistency in the deprecation approach.


150-165: Well-implemented device listing with proper error handling.

The ListDevices method correctly validates the response type and uses array mapping to convert objects to Device instances. The static function approach is efficient.


229-253: Secure query parameter handling in GetLogs.

The method properly handles optional query parameters and uses http_build_query for safe URL encoding. The null parameter handling is clean and secure.

tests/ClientTest.php (6)

3-3: Clean namespace organization.

The namespace change from AndroidSmsGateway\Tests\Domain to AndroidSmsGateway\Tests provides better organization for the test suite.


7-12: Comprehensive imports for expanded test coverage.

The new import statements properly include all domain classes and enums needed for testing the expanded client functionality.


38-69: Well-structured test with proper assertions.

The testSendMessage method thoroughly validates the HTTP request details including method, path, headers, and response parsing. The test follows good patterns for mock setup and verification.


229-244: Excellent query parameter validation.

The testGetLogs method properly validates both the URL path and query parameters, ensuring proper URL encoding of the datetime values.


267-295: Comprehensive settings test with realistic data.

The testUpdateSettings method creates a realistic Settings object with all properties and properly validates the PUT request behavior.


349-370: Well-designed webhook registration test.

The test properly uses the WebhookEvent enum and validates the webhook creation process. The assertion on the response ID is appropriate.

Copy link

@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: 0

♻️ Duplicate comments (1)
src/Client.php (1)

260-272: Settings methods now return proper domain objects.

The return type inconsistency issue from previous reviews has been correctly addressed. All settings methods now return Settings objects instead of generic objects, improving type safety and API consistency.

Also applies to: 280-292, 301-313

🧹 Nitpick comments (1)
src/Client.php (1)

187-199: Consider using domain objects for consistent API design.

While the functionality is correct, HealthCheck and RequestInboxExport return generic object types, which is inconsistent with other methods that return proper domain objects. Consider creating dedicated domain classes for these responses.

Example for HealthCheck:

-    public function HealthCheck(): object {
+    public function HealthCheck(): HealthStatus {
         // ... existing implementation ...
-        return $response;
+        return HealthStatus::FromObject($response);
     }

Also applies to: 207-220

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bc6873 and 279775b.

📒 Files selected for processing (3)
  • src/Client.php (4 hunks)
  • src/Domain/Settings.php (1 hunks)
  • tests/ClientTest.php (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Domain/Settings.php
🔇 Additional comments (13)
src/Client.php (6)

7-11: LGTM: Clean domain imports.

The new domain imports are well-organized and follow consistent naming conventions, supporting the expanded API functionality.


49-63: Proper deprecation handling implemented.

The deprecated Send method correctly triggers a user deprecation warning and delegates to the new method, ensuring backward compatibility while guiding users toward the updated API.


65-101: Enhanced SendMessage method with query parameter support.

The implementation correctly handles the optional skipPhoneValidation parameter by building query parameters and appending them to the request path. The logic for conditional query string building is sound.


103-116: Consistent deprecation pattern for GetState method.

The deprecation follows the same pattern as the Send method, maintaining consistency in the deprecation strategy.


150-165: Excellent array-to-domain-object mapping implementation.

The ListDevices and ListWebhooks methods demonstrate proper handling of array responses with clean functional mapping to domain objects using static factory methods.

Also applies to: 321-336


229-253: Robust query parameter handling in GetLogs.

The method properly handles optional query parameters for date range filtering, with clean conditional logic for building the query string.

tests/ClientTest.php (7)

3-3: LGTM: Appropriate namespace update.

The namespace change from AndroidSmsGateway\Tests\Domain to AndroidSmsGateway\Tests properly reflects the test file's broader scope.


7-12: Clean import organization for new domain objects.

The additional imports for MessagesExportRequest, Settings, Webhook, and WebhookEvent are well-organized and support the expanded test coverage.


38-69: Proper test method renaming maintains consistency.

The renamed test methods testSendMessage and testGetMessageState correctly align with the updated client method names while preserving comprehensive HTTP request verification.

Also applies to: 71-90


139-159: Comprehensive array response testing.

The tests for ListDevices and ListWebhooks properly verify both the HTTP request structure and the array-to-domain-object conversion, ensuring the mapping functionality works correctly.

Also applies to: 327-347


220-244: Excellent query parameter testing.

The testGetLogs method thoroughly verifies query parameter encoding and URL construction, including proper URL encoding of datetime strings.


246-265: Complete settings API test coverage.

The settings tests comprehensively cover GET, PUT, and PATCH operations with proper domain object verification, ensuring the Settings API functionality works end-to-end.

Also applies to: 267-295, 297-325


349-370: Webhook registration test uses proper enum.

The test correctly demonstrates usage of the WebhookEvent enum, showing proper integration between domain objects and enums.

@capcom6 capcom6 force-pushed the client/implement-new-methods branch from 279775b to b17670f Compare June 1, 2025 22:45
Copy link

@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: 0

♻️ Duplicate comments (13)
src/Client.php (3)

260-272: Excellent fix for settings return type.

The GetSettings method now correctly returns a Settings object instead of a generic object, addressing the previous review comment about type safety.


280-293: Excellent fix for settings replacement return type.

The ReplaceSettings method now correctly returns a Settings object instead of a generic object, addressing the previous review comment about consistency.


301-314: Excellent fix for settings patch return type.

The PatchSettings method now correctly returns a Settings object instead of a generic object, completing the type safety improvements for settings methods.

tests/ClientTest.php (10)

139-159: Comprehensive device listing test coverage.

The test properly verifies:

  • HTTP method and path
  • Authorization headers
  • Response parsing to domain objects
  • Array count and object properties

The redundant assertIsArray() call mentioned in past reviews has been correctly removed.


176-195: Good health check test implementation.

Tests the health endpoint properly and verifies response structure. The redundant assertIsObject() call mentioned in past reviews has been correctly removed.


197-218: Solid inbox export request test.

Properly tests the POST operation with domain object payload and response verification. The redundant assertion removal improves test clarity.


220-244: Excellent log retrieval test with query parameters.

This test thoroughly verifies:

  • Query parameter encoding in the URL
  • Array response handling
  • Domain object mapping

Good attention to detail in testing the query string construction.


246-265: Comprehensive settings retrieval test.

Tests the settings endpoint and verifies the domain object properties. Clean test without redundant assertions.


267-295: Thorough settings replacement test.

Good test coverage for the PUT operation with settings object payload and response verification.


297-325: Good settings patch test with partial data.

Properly tests the PATCH operation using null values to represent partial updates, which is realistic for patch operations.


327-347: Solid webhook listing test.

Comprehensive test coverage for webhook operations with proper domain object verification.


349-370: Excellent webhook registration test.

Tests webhook creation with enum usage and proper response handling. Good integration of the WebhookEvent enum in testing.


372-385: Clean webhook deletion test.

Properly tests the DELETE operation for webhooks with appropriate void handling.

🧹 Nitpick comments (2)
src/Client.php (2)

187-199: Consider creating a HealthCheck domain object for type safety.

While the current implementation works, returning a generic object reduces type safety compared to other methods that return domain objects.

Consider creating a HealthCheck domain object:

public function HealthCheck(): HealthCheck {
    // ... existing code ...
    return HealthCheck::FromObject($response);
}

207-220: Consider creating an ExportResult domain object.

Similar to the health check, returning a generic object for export requests reduces type consistency.

Consider creating an ExportResult or InboxExportResult domain object for better type safety.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 279775b and b17670f.

📒 Files selected for processing (17)
  • README.md (1 hunks)
  • src/Client.php (4 hunks)
  • src/Domain/Device.php (1 hunks)
  • src/Domain/LogEntry.php (1 hunks)
  • src/Domain/Message.php (3 hunks)
  • src/Domain/MessageBuilder.php (1 hunks)
  • src/Domain/MessagesExportRequest.php (1 hunks)
  • src/Domain/RecipientState.php (1 hunks)
  • src/Domain/Settings.php (1 hunks)
  • src/Domain/SettingsBuilder.php (1 hunks)
  • src/Domain/Webhook.php (1 hunks)
  • src/Enums/WebhookEvent.php (1 hunks)
  • tests/ClientTest.php (7 hunks)
  • tests/Domain/MessageBuilderTest.php (1 hunks)
  • tests/Domain/MessageTest.php (1 hunks)
  • tests/Domain/SettingsBuilderTest.php (1 hunks)
  • tests/EncryptorTest.php (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
  • src/Domain/RecipientState.php
  • tests/Domain/MessageTest.php
  • tests/EncryptorTest.php
  • tests/Domain/SettingsBuilderTest.php
  • src/Domain/MessagesExportRequest.php
  • tests/Domain/MessageBuilderTest.php
  • src/Domain/Message.php
  • src/Domain/Settings.php
  • src/Enums/WebhookEvent.php
  • src/Domain/SettingsBuilder.php
  • src/Domain/Webhook.php
  • src/Domain/LogEntry.php
  • src/Domain/MessageBuilder.php
  • src/Domain/Device.php
🔇 Additional comments (17)
README.md (1)

1-193: Excellent comprehensive documentation update!

The README has been thoroughly modernized with clear structure, comprehensive examples, and detailed API reference. The documentation accurately reflects the new client methods and properly shows the transition from deprecated methods to their replacements.

Key improvements:

  • Modern badges and professional formatting
  • Clear table of contents and section organization
  • Updated examples using SendMessage() and GetMessageState() instead of deprecated methods
  • Comprehensive API reference documenting all new methods
  • Security best practices and encryption support
  • Detailed contributing guidelines

The code examples are accurate and demonstrate proper usage of the new MessageBuilder class and updated client API.

src/Client.php (10)

7-11: Good domain object imports for expanded API coverage.

The additional imports properly support the new API methods with appropriate domain objects for Device, LogEntry, Webhook, MessagesExportRequest, and Settings.


49-63: Proper deprecation implementation for legacy method.

The deprecated Send method correctly:

  • Issues a user deprecation warning
  • Delegates to the new SendMessage method
  • Maintains backward compatibility

This follows PHP deprecation best practices.


72-101: Well-implemented replacement method with query parameter support.

The new SendMessage method properly:

  • Handles the skipPhoneValidation parameter via query string
  • Maintains encryption support
  • Follows consistent error handling patterns
  • Returns strongly-typed MessageState object

109-142: Proper deprecation and replacement for GetState method.

Similar to the Send method, this properly deprecates the old method and delegates to the new GetMessageState implementation with appropriate warnings.


150-165: Excellent device management implementation.

The ListDevices method follows consistent patterns:

  • Proper HTTP method (GET)
  • Correct path construction
  • Array response validation
  • Domain object mapping using Device::FromObject

173-180: Clean device removal implementation.

The RemoveDevice method correctly uses DELETE method and doesn't expect a response body, which is appropriate for deletion operations.


229-253: Well-implemented log retrieval with proper query handling.

The GetLogs method correctly:

  • Handles optional date parameters
  • Builds query string appropriately
  • Maps response to LogEntry domain objects
  • Validates array response type

321-336: Solid webhook listing implementation.

The webhook management follows the same consistent patterns as other list operations with proper domain object mapping.


344-357: Proper webhook registration with domain object return.

The RegisterWebhook method maintains consistency by returning a Webhook domain object rather than a generic object.


365-372: Clean webhook deletion implementation.

Follows the same pattern as RemoveDevice with appropriate void return type for deletion operations.

tests/ClientTest.php (6)

3-3: Appropriate namespace change for test organization.

The namespace change from AndroidSmsGateway\Tests\Domain to AndroidSmsGateway\Tests better reflects the scope of these client tests.


7-12: Good import additions for expanded test coverage.

The new imports properly support testing of the expanded client API with domain objects and enums.


38-38: Method renamed to match updated client API.

The test method name change from testSend to testSendMessage correctly reflects the new client method name.


71-71: Method renamed consistently.

The test method name change from testGetState to testGetMessageState maintains consistency with the client API updates.


111-115: Updated to use new client methods in integration test.

The server test correctly uses the new SendMessage and GetMessageState methods instead of the deprecated ones.


161-174: Thorough device removal test.

Properly tests the DELETE operation with appropriate response handling for void return methods.

@capcom6 capcom6 force-pushed the client/implement-new-methods branch from b17670f to 5846191 Compare June 2, 2025 08:02
Copy link

@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: 2

♻️ Duplicate comments (1)
README.md (1)

159-167: Duplicate of Constructor Inconsistency
This example highlights passing an Encryptor to the Client constructor, duplicating the mismatch flagged earlier. Ensure the API reference constructor snippet includes the encryptor parameter.

🧹 Nitpick comments (1)
README.md (1)

53-88: Consider Method Naming Consistency
The example uses PascalCase methods (SendMessage, GetMessageState), which diverges from the common PHP camelCase convention (e.g., sendMessage). If this is intentional, please document the naming style choice; otherwise, consider refactoring to camelCase for PSR-12 alignment.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b17670f and 5846191.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🔇 Additional comments (13)
README.md (13)

1-7: Header and Badges Look Good
Great job modernizing the title and adding clear, informative badges. The license, version, PHP requirement, and download count badges are accurate and well-formatted.


8-9: Description Is Clear and Concise
The one-liner effectively summarizes the library’s purpose and links to the API.


10-30: Verify Table of Contents Anchors
The TOC anchors include emojis and special characters (e.g., “📱” and trademark ™), which GitHub’s slugification may strip or alter. Please confirm that all links resolve correctly—especially the #-sms-gateway-for-android-php-api-client and #️-prerequisites anchors.


31-39: Features Section Approved
The bulleted feature list is succinct and highlights all key capabilities, including type safety and encryption.


40-46: Confirm Minimum PHP Version
The docs require PHP 7.4+, but strict typing and potential union types may demand PHP 8.0+. Please verify that PHP 7.4 is sufficient for all new features.


47-52: Installation Snippet Is Correct
The composer require command is accurate and the code fences are properly placed.


117-124: Core Methods Table Approved
The table clearly enumerates all endpoints and their descriptions.


135-143: Builder Methods Section Approved
The usage example for MessageBuilder is clear and matches the code changes.


146-154: Security Best Practices Approved
Credential handling advice and input validation tips are well-covered.


170-178: Contributing Guidelines Approved
Clear, actionable contribution steps make onboarding contributors straightforward.


180-184: Development Setup Section Approved
Cloning and installation instructions are concise and accurate.


186-188: License Section Approved
The Apache-2.0 reference is clear and the link is correct.


191-192: Trademark Note Approved
The trademark disclaimer is appropriate and correctly placed.

@capcom6 capcom6 force-pushed the client/implement-new-methods branch from 5846191 to 748e829 Compare June 2, 2025 12:58
Copy link

@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

♻️ Duplicate comments (1)
README.md (1)

92-104: Fix Unclosed Code Fence in Managing Devices example
The PHP snippet for “Managing Devices” begins with php but lacks a closing . Add the closing backticks after line 103 to ensure proper Markdown rendering.

🧹 Nitpick comments (2)
README.md (2)

109-117: Refine Client constructor signature example
This block mixes PHP type hints and omits a comma after the $serverUrl default. Consider simplifying to a real instantiation call or adjust it to a valid signature. For example:

$client = new Client(
    $login,
    $password,
    'https://api.sms-gate.app/3rdparty/v1',
    $httpClient = null,
    $encryptor = null
);

163-169: Standardize default URL usage in encryption snippet
The encryption example calls new Client($login, $password, Client::DEFAULT_URL, ...), while the signature example hardcodes the URL. Align on one approach (preferably the DEFAULT_URL constant) for consistency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5846191 and 748e829.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🔇 Additional comments (6)
README.md (6)

1-7: Excellent header and badges update
The new title and badge set clearly convey project metadata (license, version, PHP requirements, downloads). Great first impression for newcomers.


8-8: Concise library description
The one-liner effectively summarizes capabilities and points to the official API.


33-39: Feature list is clear and comprehensive
The Features section neatly highlights key client capabilities and stands out visually.


49-51: Installation snippet is properly formatted
The Composer command and its Bash code fence are correct and easy to follow.


55-63: Quickstart “Sending an SMS” example is solid
The builder pattern usage and method calls are idiomatic and straightforward.


183-186: Verify repository clone URL
The development setup points to github.com/android-sms-gateway/client-php.git, but the packagist package is capcom6/android-sms-gateway. Please confirm the correct GitHub repository URL.

@capcom6 capcom6 force-pushed the client/implement-new-methods branch from 748e829 to 8f3447c Compare June 3, 2025 06:42
@capcom6 capcom6 force-pushed the client/implement-new-methods branch from 6aa9b3b to 73b5074 Compare June 3, 2025 22:54
Copy link

@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: 0

♻️ Duplicate comments (1)
README.md (1)

15-15: Fix broken Prerequisites anchor link

The TOC entry for Prerequisites uses #️-prerequisites which won't resolve to ## ⚙️ Prerequisites. Update it to #-prerequisites so the link works correctly.

🧹 Nitpick comments (1)
tests/ClientTest.php (1)

267-295: Consider testing edge cases for settings updates

While the test covers basic settings updates, consider adding tests for edge cases like partial updates with null values, invalid settings structures, or error responses from the API.

public function testPatchSettingsWithPartialData(): void {
    $settings = new Settings(
        new \stdClass(),
        null, // Test with null values
        null,
        null,
        null,
        null
    );
    
    // Test with only one setting field updated
    // Verify that null fields are properly handled in serialization
}

public function testSettingsErrorHandling(): void {
    $responseMock = self::mockResponse(
        '{"error":"Invalid settings"}',
        400,
        ['Content-Type' => 'application/json']
    );
    
    $this->mockClient->addResponse($responseMock);
    
    $this->expectException(\AndroidSmsGateway\Exceptions\HttpException::class);
    $this->client->ReplaceSettings($invalidSettings);
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6aa9b3b and 73b5074.

📒 Files selected for processing (17)
  • README.md (1 hunks)
  • src/Client.php (4 hunks)
  • src/Domain/Device.php (1 hunks)
  • src/Domain/LogEntry.php (1 hunks)
  • src/Domain/Message.php (3 hunks)
  • src/Domain/MessageBuilder.php (1 hunks)
  • src/Domain/MessagesExportRequest.php (1 hunks)
  • src/Domain/RecipientState.php (1 hunks)
  • src/Domain/Settings.php (1 hunks)
  • src/Domain/SettingsBuilder.php (1 hunks)
  • src/Domain/Webhook.php (1 hunks)
  • src/Enums/WebhookEvent.php (1 hunks)
  • tests/ClientTest.php (7 hunks)
  • tests/Domain/MessageBuilderTest.php (1 hunks)
  • tests/Domain/MessageTest.php (1 hunks)
  • tests/Domain/SettingsBuilderTest.php (1 hunks)
  • tests/EncryptorTest.php (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • tests/EncryptorTest.php
  • tests/Domain/SettingsBuilderTest.php
🚧 Files skipped from review as they are similar to previous changes (12)
  • src/Domain/RecipientState.php
  • tests/Domain/MessageTest.php
  • tests/Domain/MessageBuilderTest.php
  • src/Domain/MessagesExportRequest.php
  • src/Domain/SettingsBuilder.php
  • src/Domain/MessageBuilder.php
  • src/Domain/Settings.php
  • src/Domain/Message.php
  • src/Domain/Webhook.php
  • src/Domain/LogEntry.php
  • src/Enums/WebhookEvent.php
  • src/Domain/Device.php
🔇 Additional comments (13)
README.md (3)

68-73: Excellent use of fluent interface in documentation

The example effectively demonstrates the builder pattern with method chaining for message configuration. This clearly shows the enhanced API capabilities and makes the library usage intuitive.


121-135: Comprehensive API reference enhances usability

The categorized method reference with descriptions provides excellent developer experience. The clear separation by functionality (Messages, Devices, System, Settings, Webhooks) makes the expanded API surface discoverable.


152-169: Strong security guidance for production usage

The security section appropriately emphasizes credential management, HTTPS usage, and includes practical examples for encryption support. This is crucial for SMS gateway integrations handling sensitive data.

src/Client.php (6)

56-63: Well-implemented deprecation strategy

The deprecation of the Send method includes proper user warnings and seamless delegation to the new SendMessage method. This provides a smooth migration path for existing users while maintaining backward compatibility.


72-88: Enhanced message sending with validation control

The new SendMessage method properly handles the skipPhoneValidation parameter through query string construction. The implementation correctly builds the query parameters and maintains the existing encryption flow.


229-253: Robust query parameter handling for logs

The GetLogs method properly handles optional date range parameters and constructs query strings safely using http_build_query. The conditional parameter building prevents empty query strings and maintains clean URLs.


260-272: Proper type safety in settings retrieval

The GetSettings method now correctly returns a Settings domain object instead of a generic object, addressing previous review feedback. This improves type safety and API consistency.


280-293: Consistent settings management methods

Both ReplaceSettings and PatchSettings now properly return Settings objects, providing type safety and consistency across the settings API. The use of appropriate HTTP verbs (PUT/PATCH) correctly reflects the semantic differences.

Also applies to: 301-314


150-165:

Details

❌ Incorrect review comment

Verify device ID validation

The ListDevices method correctly maps response objects to Device domain objects, but consider validating that device IDs are properly sanitized before use in URLs to prevent potential injection issues.


🏁 Script executed:

#!/bin/bash
# Description: Check if device IDs are validated in the Domain classes
# Expected: Device class should validate ID format or Client should sanitize IDs

# Search for Device class implementation and ID validation
ast-grep --pattern 'class Device {
  $$$
}'

# Search for any ID validation or sanitization
rg -A 5 -B 5 "ID.*validation|sanitize.*id|validate.*id" --type php

Length of output: 114


I couldn’t locate the Device class or any ID‐sanitization logic with the previous patterns. Let’s first find where Device is defined and inspect its FromObject method:


🏁 Script executed:

#!/bin/bash
# Find the Device class definition and its FromObject method

echo "Searching for class Device definition..."
rg --type php "class\s+Device" -n

echo
echo "Searching for Device::FromObject usage/definition..."
rg --type php "FromObject" -n

Length of output: 2096


Let’s inspect the Device::FromObject implementation for any ID checks or sanitization:


🏁 Script executed:

#!/bin/bash
# Show the FromObject method with some context
rg -n -A20 -B3 "public static function FromObject" src/Domain/Device.php

Length of output: 750


Let’s check the Device constructor for any type hints or ID validation logic:


🏁 Script executed:

#!/bin/bash
# Show Device::__construct implementation with surrounding context
rg -n -A5 -B5 "public function __construct" src/Domain/Device.php

Length of output: 409


No ID Injection Risk in ListDevices

The ListDevices method always calls GET /devices without interpolating any device ID into the URL, so there’s no opportunity for an injected ID here. ID sanitization should instead be implemented in any client methods that accept or embed device IDs in their paths (e.g., GetDevice($id), DeleteDevice($id)).

Likely an incorrect or invalid review comment.

tests/ClientTest.php (4)

38-50: Good test method renaming for API consistency

The renaming of testSend to testSendMessage and testGetState to testGetMessageState properly aligns the tests with the new non-deprecated method names, maintaining clear test documentation.

Also applies to: 71-80


139-159: Comprehensive device management testing

The testListDevices method properly verifies HTTP method, path, authentication, and response parsing. The mock response includes realistic device data structure with all expected fields.


220-244: Excellent query parameter testing

The testGetLogs method thoroughly validates query parameter encoding and URL construction, including proper URL encoding of datetime values. This ensures the date range filtering works correctly.


349-370: Strong webhook registration testing

The test properly uses the WebhookEvent enum and validates the complete request/response cycle for webhook registration, ensuring proper domain object handling.

@capcom6 capcom6 merged commit 920e0f7 into master Jun 4, 2025
6 checks passed
@capcom6 capcom6 deleted the client/implement-new-methods branch June 4, 2025 01:37
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