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

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