Passed
Push — develop ( fcd18c...7888af )
by Septianata
11:22
created
routes/auth.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,31 +10,31 @@
 block discarded – undo
10 10
 use App\Http\Controllers\Auth\VerifyEmailController;
11 11
 use Illuminate\Support\Facades\Route;
12 12
 
13
-Route::middleware('guest:web')->group(function () {
14
-    Route::get('/register', [RegisteredUserController::class, 'create'])->name('register');
15
-    Route::post('/register', [RegisteredUserController::class, 'store']);
13
+Route::middleware('guest:web')->group(function() {
14
+    Route::get('/register', [ RegisteredUserController::class, 'create' ])->name('register');
15
+    Route::post('/register', [ RegisteredUserController::class, 'store' ]);
16 16
 
17
-    Route::get('/login', [AuthenticatedSessionController::class, 'create'])->name('login');
18
-    Route::post('/login', [AuthenticatedSessionController::class, 'store']);
17
+    Route::get('/login', [ AuthenticatedSessionController::class, 'create' ])->name('login');
18
+    Route::post('/login', [ AuthenticatedSessionController::class, 'store' ]);
19 19
 
20
-    Route::get('/forgot-password', [PasswordResetLinkController::class, 'create'])->name('password.request');
21
-    Route::post('/forgot-password', [PasswordResetLinkController::class, 'store'])->name('password.email');
20
+    Route::get('/forgot-password', [ PasswordResetLinkController::class, 'create' ])->name('password.request');
21
+    Route::post('/forgot-password', [ PasswordResetLinkController::class, 'store' ])->name('password.email');
22 22
 
23
-    Route::get('/reset-password/{token}', [NewPasswordController::class, 'create'])->name('password.reset');
24
-    Route::post('/reset-password', [NewPasswordController::class, 'store'])->name('password.update');
23
+    Route::get('/reset-password/{token}', [ NewPasswordController::class, 'create' ])->name('password.reset');
24
+    Route::post('/reset-password', [ NewPasswordController::class, 'store' ])->name('password.update');
25 25
 });
26 26
 
27
-Route::middleware('auth_on_verifying:web', 'throttle:6,1')->group(function () {
27
+Route::middleware('auth_on_verifying:web', 'throttle:6,1')->group(function() {
28 28
     Route::get('/verify-email/{id}/{hash}', VerifyEmailController::class)->middleware('signed')->name('verification.verify');
29
-    Route::post('/email/verification-notification', [EmailVerificationNotificationController::class, 'store'])->name('verification.send');
29
+    Route::post('/email/verification-notification', [ EmailVerificationNotificationController::class, 'store' ])->name('verification.send');
30 30
 });
31 31
 
32
-Route::middleware('auth:web')->group(function () {
32
+Route::middleware('auth:web')->group(function() {
33 33
     Route::get('/verify-email', EmailVerificationPromptController::class)->name('verification.notice');
34 34
     Route::view('/verify-email-success', 'auth.verify-email-success')->middleware('verified')->name('verification.success');
35 35
 
36
-    Route::get('/confirm-password', [ConfirmablePasswordController::class, 'show'])->name('password.confirm');
37
-    Route::post('/confirm-password', [ConfirmablePasswordController::class, 'store']);
36
+    Route::get('/confirm-password', [ ConfirmablePasswordController::class, 'show' ])->name('password.confirm');
37
+    Route::post('/confirm-password', [ ConfirmablePasswordController::class, 'store' ]);
38 38
 
39
-    Route::post('/logout', [AuthenticatedSessionController::class, 'destroy'])->name('logout');
39
+    Route::post('/logout', [ AuthenticatedSessionController::class, 'destroy' ])->name('logout');
40 40
 });
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfUnactive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function handle(Request $request, Closure $next, ...$guards)
20 20
     {
21
-        $guards = empty($guards) ? [null] : $guards;
21
+        $guards = empty($guards) ? [ null ] : $guards;
22 22
 
23 23
         foreach ($guards as $guard) {
24 24
             if (Auth::guard($guard)->check() && !Auth::user()->is_active) {
Please login to merge, or discard this patch.
app/Infrastructure/Foundation/Http/FormRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,10 +70,10 @@
 block discarded – undo
70 70
      * @param  bool  $stopOnFirstFailure
71 71
      * @return \Illuminate\Contracts\Validation\Validator
72 72
      */
73
-    public static function createValidator($data, string $field, array $messages = [], bool $stopOnFirstFailure = false): ValidationFactory
73
+    public static function createValidator($data, string $field, array $messages = [ ], bool $stopOnFirstFailure = false): ValidationFactory
74 74
     {
75 75
         return Validator::make(
76
-            [$field => $data],
76
+            [ $field => $data ],
77 77
             Arr::only(static::getRules(), $field),
78 78
             $messages,
79 79
             Arr::only(static::getAttributes(), $field)
Please login to merge, or discard this patch.
app/Models/Customer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     public static function retrieveByBotManUser(UserInterface $user)
53 53
     {
54 54
         return static::firstWhere([
55
-            ['telegram_chat_id', $user->getId()],
56
-            ['username', $user->getUsername()],
55
+            [ 'telegram_chat_id', $user->getId() ],
56
+            [ 'username', $user->getUsername() ],
57 57
         ]);
58 58
     }
59 59
 
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     public static function retrieveByUsernameAndEmail(array $credentials)
67 67
     {
68 68
         return static::firstWhere([
69
-            ['username', $credentials['username']],
70
-            ['email', $credentials['email']],
69
+            [ 'username', $credentials[ 'username' ] ],
70
+            [ 'email', $credentials[ 'email' ] ],
71 71
         ]);
72 72
     }
73 73
 
Please login to merge, or discard this patch.
routes/botman.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
 
23 23
 $exchange = view('conversations.home.reply-menu-exchange')->render();
24 24
 
25
-$botman->hears('Hi', fn (BotMan $botman) => $botman->startConversation(new ExampleConversation));
26
-$botman->hears('/start', fn (BotMan $botman) => $botman->startConversation(new StartConservation));
27
-$botman->hears(['/exchange', $exchange], fn (BotMan $botman) => $botman->startConversation(new ExchangeConversation));
28
-$botman->hears('/help', fn (BotMan $botman) => $botman->startConversation(new HelpConversation));
25
+$botman->hears('Hi', fn(BotMan $botman) => $botman->startConversation(new ExampleConversation));
26
+$botman->hears('/start', fn(BotMan $botman) => $botman->startConversation(new StartConservation));
27
+$botman->hears([ '/exchange', $exchange ], fn(BotMan $botman) => $botman->startConversation(new ExchangeConversation));
28
+$botman->hears('/help', fn(BotMan $botman) => $botman->startConversation(new HelpConversation));
29 29
 
30
-$botman->fallback(function (BotMan $botman) use ($exchange) {
30
+$botman->fallback(function(BotMan $botman) use ($exchange) {
31 31
     $message = __("Maaf, kami tidak mengenali maksud dari '{$botman->getMessage()->getText()}'.");
32 32
 
33 33
     $botman->reply($message, additionalParameters: Keyboard::create(Keyboard::TYPE_KEYBOARD)->resizeKeyboard()->oneTimeKeyboard()->addRow(
Please login to merge, or discard this patch.
app/Enum/Gender.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         return [
34 34
             'male' => trans('Mr.'),
35 35
             'female' => trans('Mrs.'),
36
-        ][$this->value] ?? null;
36
+        ][ $this->value ] ?? null;
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
app/Conversations/StartConservation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function run()
20 20
     {
21 21
         if ($customer = Customer::retrieveByBotManUser($this->getUser())) {
22
-            $this->setUserStorage(['gender' => $customer->gender]);
22
+            $this->setUserStorage([ 'gender' => $customer->gender ]);
23 23
         }
24 24
 
25 25
         $name = Str::ucfirst($this->getUser()->getFirstName());
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
             )->toArray()
42 42
         );
43 43
 
44
-        return $this->getBot()->storeConversation($this, next: function (Answer $answer) use ($name, $response) {
44
+        return $this->getBot()->storeConversation($this, next: function(Answer $answer) use ($name, $response) {
45 45
             if (!$answer->isInteractiveMessageReply()) {
46 46
                 return;
47 47
             }
48 48
 
49
-            $this->setUserStorage(['gender' => $gender = $answer->getValue()]);
49
+            $this->setUserStorage([ 'gender' => $gender = $answer->getValue() ]);
50 50
 
51 51
             $title = $this->getTitle($gender);
52 52
 
Please login to merge, or discard this patch.
app/Conversations/UpdateCustomerConversation.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
             )->toArray()
35 35
         );
36 36
 
37
-        return $this->getBot()->storeConversation($this, next: function (Answer $answer) use ($response) {
37
+        return $this->getBot()->storeConversation($this, next: function(Answer $answer) use ($response) {
38 38
             if (!$answer->isInteractiveMessageReply()) {
39 39
                 return;
40 40
             }
41 41
 
42
-            $this->setUserStorage(['gender' => $answer->getValue()]);
42
+            $this->setUserStorage([ 'gender' => $answer->getValue() ]);
43 43
 
44 44
             $this->deleteTelegramMessageFromResponse($response);
45 45
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $this->displayValidationErrorMessage($validationErrorMessage);
56 56
 
57
-        return $this->askRenderable('conversations.exchange.ask-email', function (Answer $answer) {
57
+        return $this->askRenderable('conversations.exchange.ask-email', function(Answer $answer) {
58 58
             $value = $answer->getText();
59 59
             $validator = CustomerUpdateRequest::createValidator($value, 'email');
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 return $this->askEmail($validator->errors()->first('email'));
63 63
             }
64 64
 
65
-            $this->setUserStorage(['email' => $validator->validated()['email']]);
65
+            $this->setUserStorage([ 'email' => $validator->validated()[ 'email' ] ]);
66 66
 
67 67
             return $this->askFullName();
68 68
         });
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     {
76 76
         $this->displayValidationErrorMessage($validationErrorMessage);
77 77
 
78
-        return $this->askRenderable('conversations.register-customer.ask-phone', function () {
78
+        return $this->askRenderable('conversations.register-customer.ask-phone', function() {
79 79
             $value = $this->getMessagePayload('contact.phone_number');
80 80
             $validator = CustomerUpdateRequest::createValidator($value, 'phone');
81 81
 
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
                 return $this->askPhone($validator->errors()->first('phone'));
84 84
             }
85 85
 
86
-            $this->setUserStorage(['phone' => $validator->validated()['phone']]);
86
+            $this->setUserStorage([ 'phone' => $validator->validated()[ 'phone' ] ]);
87 87
 
88 88
             return $this->askWhatsappPhone();
89
-        }, additionalParameters: ['reply_markup' => json_encode([
90
-            'keyboard' => [[['text' => '☎️ ' . trans('Send My Phone Number'), 'request_contact' => true]]],
89
+        }, additionalParameters: [ 'reply_markup' => json_encode([
90
+            'keyboard' => [ [ [ 'text' => '☎️ '.trans('Send My Phone Number'), 'request_contact' => true ] ] ],
91 91
             'resize_keyboard' => true,
92 92
             'one_time_keyboard' => true,
93 93
             'remove_keyboard' => true,
94
-        ])]);
94
+        ]) ]);
95 95
     }
96 96
 }
Please login to merge, or discard this patch.
app/Conversations/HomeConservation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
             )->toArray()
30 30
         );
31 31
 
32
-        return $this->getBot()->storeConversation($this, next: function (Answer $answer) use ($response) {
32
+        return $this->getBot()->storeConversation($this, next: function(Answer $answer) use ($response) {
33 33
             if (!$answer->isInteractiveMessageReply()) {
34 34
                 return;
35 35
             }
Please login to merge, or discard this patch.