Skip to content

Commit

Permalink
style: fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldoggutierrez committed Apr 4, 2024
1 parent 710f6ed commit ff14821
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ public static function quickReplyButton(array $payloads): Component\QuickReplyBu

public static function flowButton(string $token, array $data): Component\FlowButton
{
return new Component\FlowButton($token,$data);
return new Component\FlowButton($token, $data);
}
}
5 changes: 1 addition & 4 deletions src/Component/FlowButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

namespace NotificationChannels\WhatsApp\Component;

use NotificationChannels\WhatsApp\Component\Component;

class FlowButton extends Button
{

public function __construct(?string $token, array $data)
{
$this->parameters[] = [
'type' => 'action',
'action' => [
'flow_token' => $token,
'flow_action_data' => $data
'flow_action_data' => $data,
],
];
}
Expand Down
9 changes: 4 additions & 5 deletions tests/Component/FlowButtonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace NotificationChannels\WhatsApp\Test\Component;

use NotificationChannels\WhatsApp\Component\FlowButton;
use NotificationChannels\WhatsApp\Component\UrlButton;
use PHPUnit\Framework\TestCase;

final class FlowButtonTest extends TestCase
Expand All @@ -23,10 +22,10 @@ public function flow_button_is_valid()
'action' => [
'flow_token' => 'token',
'flow_action_data' => [
'test' => 'example'
]
]
]
'test' => 'example',
],
],
],
],
];

Expand Down
2 changes: 1 addition & 1 deletion tests/ComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function it_can_return_a_quick_reply_button_component()
/** @test */
public function it_can_return_a_flow_reply_button_component()
{
$component = Component::flowButton('token',['example' => "test"]);
$component = Component::flowButton('token', ['example' => 'test']);

$this->assertInstanceOf(Component\FlowButton::class, $component);
}
Expand Down

0 comments on commit ff14821

Please sign in to comment.