chore: code styling via pint
This commit is contained in:
@@ -4,15 +4,17 @@ namespace App\Livewire\Dashboard;
|
||||
|
||||
use Livewire\Component;
|
||||
use Session;
|
||||
use function Pest\Laravel\withoutMockingConsoleOutput;
|
||||
|
||||
class BulkGmail extends Component
|
||||
{
|
||||
public $email;
|
||||
|
||||
public int $quantity = 10;
|
||||
|
||||
public $bulkEmails = [];
|
||||
|
||||
public function mount() {
|
||||
public function mount()
|
||||
{
|
||||
$subscriptionCheck = auth()->user()->subscribedToProduct(config('app.plans')[0]['product_id']);
|
||||
Session::put('isSubscribed', $subscriptionCheck);
|
||||
}
|
||||
@@ -32,17 +34,17 @@ class BulkGmail extends Component
|
||||
$this->bulkEmails = [];
|
||||
}
|
||||
|
||||
$this->bulkEmails = $this->generateDotVariants(explode("@", $this->email)[0], $this->quantity);
|
||||
$this->bulkEmails = $this->generateDotVariants(explode('@', $this->email)[0], $this->quantity);
|
||||
}
|
||||
|
||||
public function downloadBulk()
|
||||
{
|
||||
// Ensure there's something to download
|
||||
if (empty($this->bulkEmails) || !is_array($this->bulkEmails)) {
|
||||
if (empty($this->bulkEmails) || ! is_array($this->bulkEmails)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$filename = 'bulk_gmails_' . now()->format('Ymd_His') . '.txt';
|
||||
$filename = 'bulk_gmails_'.now()->format('Ymd_His').'.txt';
|
||||
$content = implode(PHP_EOL, $this->bulkEmails);
|
||||
|
||||
return response()->streamDownload(function () use ($content) {
|
||||
@@ -66,11 +68,11 @@ class BulkGmail extends Component
|
||||
$lastPos = 0;
|
||||
|
||||
foreach ($combo as $pos) {
|
||||
$dotted .= substr($uname, $lastPos, $pos - $lastPos) . '.';
|
||||
$dotted .= substr($uname, $lastPos, $pos - $lastPos).'.';
|
||||
$lastPos = $pos;
|
||||
}
|
||||
$dotted .= substr($uname, $lastPos);
|
||||
$results[] = $dotted . '@gmail.com';
|
||||
$results[] = $dotted.'@gmail.com';
|
||||
|
||||
if (count($results) >= $quantity) {
|
||||
return $results;
|
||||
|
||||
Reference in New Issue
Block a user