Skip to content

Commit

Permalink
document the 2 helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ziming committed Jan 25, 2024
1 parent 521d393 commit b611c84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ LaravelEmailSniperLink::getSniperLinkQuick('[email protected]', 'optional-from-
LaravelEmailSniperLink::getSniperLink('[email protected]', '[email protected]')
```

In the future I may add helper functions. The `LaravelEmailSniperLink` class has more static methods as well which might be useful for you
The `LaravelEmailSniperLink` class has more static methods as well which might be useful for you.

Some helper functions are also available. For now there are 2. `email_sniper_link_quick(string $receiverEmail, ?string $fromEmail = null)` and `email_sniper_link(string $receiverEmail, ?string $fromEmail = null)`.

```php

## Testing

Expand Down
3 changes: 3 additions & 0 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ function sniper_link_quick(string $receiverEmail, ?string $fromEmail = null): ?s
}

if (! function_exists('email_sniper_link')) {
/**
* @throws \Detection\Exception\MobileDetectException
*/
function sniper_link_quick(string $receiverEmail, ?string $fromEmail = null): ?string

Check failure on line 18 in src/helpers.php

View workflow job for this annotation

GitHub Actions / P8.3 - L10.* - prefer-lowest - ubuntu-latest

Cannot redeclare sniper_link_quick() (previously declared in /home/runner/work/laravel-email-sniper-link/laravel-email-sniper-link/src/helpers.php:8)

Check failure on line 18 in src/helpers.php

View workflow job for this annotation

GitHub Actions / P8.3 - L10.* - prefer-stable - ubuntu-latest

Cannot redeclare sniper_link_quick() (previously declared in /home/runner/work/laravel-email-sniper-link/laravel-email-sniper-link/src/helpers.php:8)

Check failure on line 18 in src/helpers.php

View workflow job for this annotation

GitHub Actions / P8.2 - L10.* - prefer-lowest - ubuntu-latest

Cannot redeclare sniper_link_quick() (previously declared in /home/runner/work/laravel-email-sniper-link/laravel-email-sniper-link/src/helpers.php:8)

Check failure on line 18 in src/helpers.php

View workflow job for this annotation

GitHub Actions / P8.2 - L10.* - prefer-stable - ubuntu-latest

Cannot redeclare sniper_link_quick() (previously declared in /home/runner/work/laravel-email-sniper-link/laravel-email-sniper-link/src/helpers.php:8)

Check failure on line 18 in src/helpers.php

View workflow job for this annotation

GitHub Actions / P8.1 - L10.* - prefer-lowest - ubuntu-latest

Cannot redeclare sniper_link_quick() (previously declared in /home/runner/work/laravel-email-sniper-link/laravel-email-sniper-link/src/helpers.php:8)

Check failure on line 18 in src/helpers.php

View workflow job for this annotation

GitHub Actions / P8.1 - L10.* - prefer-stable - ubuntu-latest

Cannot redeclare sniper_link_quick() (previously declared in /home/runner/work/laravel-email-sniper-link/laravel-email-sniper-link/src/helpers.php:8)
{
return LaravelEmailSniperLink::getSniperLink($receiverEmail, $fromEmail);
Expand Down

0 comments on commit b611c84

Please sign in to comment.