Skip to content

Commit 4248f84

Browse files
authored
Merge pull request #3 from gdebrauwer/rename-sendcode-method
Rename 'sendCode' method to 'send'
2 parents a9a5d16 + c1db69a commit 4248f84

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ php artisan vendor:publish --provider="NextApps\VerificationCode\VerificationCod
3636

3737
### Generate and send a verification code
3838
```php
39-
VerificationCode::sendCode($email);
39+
VerificationCode::send($email);
4040
```
4141
This will generate a verification code for the user. The code will be stored in the `verification_codes` table. An email with the generated code will then be sent to the user matching the given email address.
4242

src/VerificationCodeManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class VerificationCodeManager
1616
*
1717
* @return void
1818
*/
19-
public function sendCode($verifiable)
19+
public function send($verifiable)
2020
{
2121
$testVerifiables = config('verification-code.test_verifiables', []);
2222

tests/VerificationCodeTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function it_sends_mail_to_verifiable()
1616
{
1717
$email = $this->faker->safeEmail;
1818

19-
VerificationCodeFacade::sendCode($email);
19+
VerificationCodeFacade::send($email);
2020

2121
$this->assertNotNull(VerificationCode::where('verifiable', $email)->first());
2222

@@ -36,7 +36,7 @@ public function it_queues_mail_to_verifiable()
3636

3737
config()->set('verification-code.queue', $queue);
3838

39-
VerificationCodeFacade::sendCode($email);
39+
VerificationCodeFacade::send($email);
4040

4141
$this->assertNotNull(VerificationCode::where('verifiable', $email)->first());
4242

@@ -55,7 +55,7 @@ public function it_does_not_queue_mail_to_verifiable()
5555

5656
config()->set('verification-code.queue', null);
5757

58-
VerificationCodeFacade::sendCode($email);
58+
VerificationCodeFacade::send($email);
5959

6060
$this->assertNotNull(VerificationCode::where('verifiable', $email)->first());
6161

@@ -74,7 +74,7 @@ public function it_sends_no_mail_to_test_verifiable()
7474

7575
config()->set('verification-code.test_verifiables', [$email]);
7676

77-
VerificationCodeFacade::sendCode($email);
77+
VerificationCodeFacade::send($email);
7878

7979
$this->assertNull(VerificationCode::where('verifiable', $email)->first());
8080

@@ -90,7 +90,7 @@ public function it_deletes_other_codes_of_verifiable_after_send_mail()
9090
'verifiable' => $email,
9191
]);
9292

93-
VerificationCodeFacade::sendCode($email);
93+
VerificationCodeFacade::send($email);
9494

9595
$dbOldVerificationCodes = VerificationCode::find($oldVerificationCodes->pluck('id')->toArray());
9696

0 commit comments

Comments
 (0)