Code Duplication    Length = 15-20 lines in 4 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

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

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

@@ 564-579 (lines=16) @@
561
        throw new \Exception("Not used");
562
    }
563
564
    public function getInputFilter()
565
    {
566
        if (!$this->inputFilter) {
567
            $inputFilter = new InputFilter();
568
            $factory     = new InputFactory();
569
570
            $inputFilter->add($factory->createInput(array(
571
                        'name'     => 'availability',
572
                        'required' => false,
573
                    )));
574
575
            $this->inputFilter = $inputFilter;
576
        }
577
578
        return $this->inputFilter;
579
    }
580
}
581