MailMessageFormat::getText()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the 2amigos/qrcode-library project.
5
 *
6
 * (c) 2amigOS! <http://2amigos.us/>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace Da\QrCode\Format;
13
14
use Da\QrCode\Traits\EmailTrait;
15
16
/**
17
 * Class MailMessage formats a string to properly create a NNTMail QrCode
18
 *
19
 * @author Antonio Ramirez <[email protected]>
20
 * @link https://www.2amigos.us/
21
 * @package Da\QrCode\Format
22
 */
23
class MailMessageFormat extends AbstractFormat
24
{
25
    use EmailTrait;
26
27
    /**
28
     * @var string the subject
29
     */
30
    public $subject;
31
    /**
32
     * @var string the body of the mail message
33
     */
34
    public $body;
35
36
    /**
37
     * @inheritdoc
38
     */
39
    public function getText(): string
40
    {
41
        return "MATMSG:TO:{$this->email};SUB:{$this->subject};BODY:{$this->body};;";
42
    }
43
}
44