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

@@ 557-572 (lines=16) @@
554
        throw new \Exception("Not used");
555
    }
556
557
    public function getInputFilter()
558
    {
559
        if (!$this->inputFilter) {
560
            $inputFilter = new InputFilter();
561
            $factory     = new InputFactory();
562
563
            $inputFilter->add($factory->createInput(array(
564
                        'name'     => 'availability',
565
                        'required' => false,
566
                    )));
567
568
            $this->inputFilter = $inputFilter;
569
        }
570
571
        return $this->inputFilter;
572
    }
573
}
574