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/MissionGame.php 1 location

@@ 297-311 (lines=15) @@
294
        throw new \Exception("Not used");
295
    }
296
297
    public function getInputFilter()
298
    {
299
        if (! $this->inputFilter) {
300
            $inputFilter = new InputFilter();
301
            $factory = new InputFactory();
302
303
            $inputFilter->add($factory->createInput(array(
304
                'name' => 'game',
305
                'required' => false,
306
            )));
307
            $this->inputFilter = $inputFilter;
308
        }
309
    
310
        return $this->inputFilter;
311
    }
312
}
313

src/PlaygroundGame/Entity/Mission.php 1 location

@@ 154-173 (lines=20) @@
151
152
    }
153
154
    public function getInputFilter()
155
    {
156
        if (! $this->inputFilter) {
157
            $inputFilter = new InputFilter();
158
            $factory = new InputFactory();
159
160
            $inputFilter = parent::getInputFilter();
161
            
162
            // This definition is mandatory for the hydration to work in a form !!!!
163
            $inputFilter->add($factory->createInput(array(
164
                'name' => 'missionGames',
165
                'required' => false,
166
            )));
167
            
168
169
            $this->inputFilter = $inputFilter;
170
        }
171
    
172
        return $this->inputFilter;
173
    }
174
}
175