Code Duplication    Length = 7-7 lines in 2 locations

src/MailableFactory.php 1 location

@@ 22-28 (lines=7) @@
19
20
    public function getInstance(string $mailableClass, string $toEmail, $defaultValues): Mailable
21
    {
22
        if (! class_exists($mailableClass)) {
23
            $mailableClass = sprintf('%s\\%s', config('mailable-test.base_namespace'), $mailableClass);
24
25
            if (! class_exists($mailableClass)) {
26
                throw MailableDoesntExist::withClass($mailableClass);
27
            }
28
        }
29
30
        $argumentValues = $this->getArguments($mailableClass, $defaultValues);
31

src/SendTestMail.php 1 location

@@ 70-76 (lines=7) @@
67
68
    protected function vaildateMailable($mailableClass)
69
    {
70
        if (! class_exists($mailableClass)) {
71
            $mailableClass = sprintf('%s\\%s', config('mailable-test.base_namespace'), $mailableClass);
72
73
            if (! class_exists($mailableClass)) {
74
                return false;
75
            }
76
        }
77
78
        return true;
79
    }