diff --git a/src/LaravelSegmentManager.php b/src/LaravelSegmentManager.php index 33adad5..a0a36b1 100755 --- a/src/LaravelSegmentManager.php +++ b/src/LaravelSegmentManager.php @@ -40,9 +40,9 @@ public function alias(string $previousId, string $userId): void public function identify(string $userId, array $data) { - Segment::identify(array( + Segment::identify([ "userId" => $userId, - "traits" => $data - )); + "traits" => $data, + ]); } } diff --git a/tests/LaravelSegmentTest.php b/tests/LaravelSegmentTest.php index 073cb1e..7171b8a 100644 --- a/tests/LaravelSegmentTest.php +++ b/tests/LaravelSegmentTest.php @@ -2,6 +2,7 @@ use BinarCode\LaravelSegment\Dto\SegmentPayload; use BinarCode\LaravelSegment\Facades\LaravelSegment; + use function PHPUnit\Framework\assertInstanceOf; it('can send instantiate payload', function () {