Completed
Push — FVSv2 ( fdb1fd...10d7ab )
by Patrick
08:12
created

PendingRejectedEmail::getHTMLBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 7
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Emails;
3
4
class PendingRejectedEmail extends VolunteerEmail
5
{
6
    public function __construct($userProfile)
7
    {
8
        parent::__construct($userProfile);
9
        $this->addToAddress($userProfile->email);
10
    }
11
12
    public function getSubject()
13
    {
14
        return 'Burning Flipside: Volunteer Shift removed';
15
    }
16
17
    public function setShift($shift)
18
    {
19
        $this->shift = $shift;
0 ignored issues
show
Bug introduced by
The property shift does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
20
    }
21
22 View Code Duplication
    public function getHTMLBody()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
    {
24
        return 'You are recieving this message because your pending shift for '.$this->shift['roleID'].' starting at '.$this->shift['startTime'].' has been removed.<br/>
25
                Thank you for your interest in this shift, but we could not accomidate your request for this shift at this time.<br/>
26
                Thank you,<br/>
27
                Burning Flipside Volunteer Team';
28
    }
29
30 View Code Duplication
    public function getTextBody()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
31
    {
32
        return 'You are recieving this message because your pending shift for '.$this->shift['roleID'].' starting at '.$this->shift['startTime'].' has been removed.
33
                Thank you for your interest in this shift, but we could not accomidate your request for this shift at this time.
34
                Thank you,
35
                Burning Flipside Volunteer Team';
36
    }
37
}
38
/* vim: set tabstop=4 shiftwidth=4 expandtab: */
39