Code Duplication    Length = 14-14 lines in 2 locations

app/class.VolunteerShift.php 2 locations

@@ 101-114 (lines=14) @@
98
                    }
99
                }
100
                return $this->participantObj;
101
            case 'webParticipantName':
102
                if($this->webParticipantName === null)
103
                {
104
                    if(isset($this->dbData['participant']))
105
                    {
106
                        $tmp = new \VolunteerProfile($this->dbData['participant']);
107
                        $this->webParticipantName = $tmp->getDisplayName();
108
                    }
109
                    else
110
                    {
111
                        $this->webParticipantName = "";
112
                    }
113
                }
114
                return $this->webParticipantName;
115
            case 'scheduleParticipantName':
116
                if($this->scheduleParticipantName === null)
117
                {
@@ 115-128 (lines=14) @@
112
                    }
113
                }
114
                return $this->webParticipantName;
115
            case 'scheduleParticipantName':
116
                if($this->scheduleParticipantName === null)
117
                {
118
                    if(isset($this->dbData['participant']))
119
                    {
120
                        $tmp = new \VolunteerProfile($this->dbData['participant']);
121
                        $this->scheduleParticipantName = $tmp->getDisplayName('paperName');
122
                    }
123
                    else
124
                    {
125
                        $this->scheduleParticipantName = "";
126
                    }
127
                }
128
                return $this->scheduleParticipantName;
129
            default:
130
                return $this->dbData[$propName];
131
        }