Code Duplication    Length = 15-20 lines in 3 locations

src/PlaygroundGame/Entity/Lottery.php 1 location

@@ 157-174 (lines=18) @@
154
        throw new \Exception("Not used");
155
    }
156
157
    public function getInputFilter()
158
    {
159
        if (!$this->inputFilter) {
160
            $inputFilter = new InputFilter();
161
            $factory = new InputFactory();
162
163
            $inputFilter = parent::getInputFilter();
164
165
            $inputFilter->add($factory->createInput(array(
166
                'name' => 'drawDate',
167
                'required' => false
168
            )));
169
170
            $this->inputFilter = $inputFilter;
171
        }
172
173
        return $this->inputFilter;
174
    }
175
}
176

src/PlaygroundGame/Entity/Mission.php 1 location

@@ 105-124 (lines=20) @@
102
103
    }
104
105
    public function getInputFilter()
106
    {
107
        if (! $this->inputFilter) {
108
            $inputFilter = new InputFilter();
109
            $factory = new InputFactory();
110
111
            $inputFilter = parent::getInputFilter();
112
            
113
            // This definition is mandatory for the hydration to work in a form !!!!
114
            $inputFilter->add($factory->createInput(array(
115
                'name' => 'missionGames',
116
                'required' => false,
117
            )));
118
            
119
120
            $this->inputFilter = $inputFilter;
121
        }
122
    
123
        return $this->inputFilter;
124
    }
125
}
126

src/PlaygroundGame/Entity/MissionGame.php 1 location

@@ 253-267 (lines=15) @@
250
        throw new \Exception("Not used");
251
    }
252
253
    public function getInputFilter()
254
    {
255
        if (! $this->inputFilter) {
256
            $inputFilter = new InputFilter();
257
            $factory = new InputFactory();
258
259
            $inputFilter->add($factory->createInput(array(
260
                'name' => 'game',
261
                'required' => false,
262
            )));
263
            $this->inputFilter = $inputFilter;
264
        }
265
    
266
        return $this->inputFilter;
267
    }
268
}
269