Code Duplication    Length = 8-8 lines in 2 locations

app/Emails/class.CertificationEmail.php 1 location

@@ 18-25 (lines=8) @@
15
        {
16
            throw new \Exception("Could not locate email with source type $emailTypeSource");
17
        }
18
        if(isset($entries['value']))
19
        {
20
            $this->text = $entries['value'];
21
        }
22
        else if(isset($entries[0]['value']))
23
        {
24
            $this->text = $entries[0]['value'];
25
        }
26
        $this->addToAddress($this->profile->email);
27
        $this->additionalProps = $other;
28
        $dataTable = \DataSetFactory::getDataTableByNames('fvs', 'certifications');

app/Emails/class.ShiftEmail.php 1 location

@@ 19-26 (lines=8) @@
16
        {
17
            throw new \Exception("Could not locate email with source type $emailTypeSource");
18
        }
19
        if(isset($entries['value']))
20
        {
21
            $this->text = $entries['value'];
22
        }
23
        else if(isset($entries[0]['value']))
24
        {
25
            $this->text = $entries[0]['value'];
26
        }
27
        $this->addToAddress($this->profile->email);
28
    }
29