Passed
Push — master ( c65021...b58a23 )
by Murilo
02:50
created

ConfirmEmail   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A bind() 0 17 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Source\Domain\Templates;
6
7
abstract class ConfirmEmail
8
{
9
    public final static function bind(string $confirmURL = ''): string
10
    {
11
        if (empty($confirmURL)) {
12
            throw new \InvalidArgumentException('Please provide the confirmation URL');
13
        }
14
15
        return '
16
            <!DOCTYPE html>
17
            <html lang="en">
18
            <head>
19
                <meta charset="UTF-8">
20
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
21
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
22
                <title>Document</title>
23
            </head>
24
            <body>
25
                Please confirm your email ' . $confirmURL . '
26
            </body>
27
            </html>
28
        ';
29
    } 
30
}
31