Code Duplication    Length = 11-11 lines in 5 locations

src/Eccube/Event/FormEventSubscriber.php 5 locations

@@ 82-92 (lines=11) @@
79
        );
80
    }
81
82
    public function onPreSetData(FormEvent $event)
83
    {
84
        $events = self::getEvents();
85
86
        if (isset($events['onPreSetData'])) {
87
            foreach ($events['onPreSetData'] as $formEventClass) {
88
                $formEvent = new $formEventClass();
89
                $formEvent->onPreSetData($event);
90
            }
91
        }
92
    }
93
94
    public function onPostSetData(FormEvent $event)
95
    {
@@ 94-104 (lines=11) @@
91
        }
92
    }
93
94
    public function onPostSetData(FormEvent $event)
95
    {
96
        $events = self::getEvents();
97
98
        if (isset($events['onPostSetData'])) {
99
            foreach ($events['onPostSetData'] as $formEventClass) {
100
                $formEvent = new $formEventClass();
101
                $formEvent->onPostSetData($event);
102
            }
103
        }
104
    }
105
106
    public function onPreSubmit(FormEvent $event)
107
    {
@@ 106-116 (lines=11) @@
103
        }
104
    }
105
106
    public function onPreSubmit(FormEvent $event)
107
    {
108
        $events = self::getEvents();
109
110
        if (isset($events['onPreSubmit'])) {
111
            foreach ($events['onPreSubmit'] as $formEventClass) {
112
                $formEvent = new $formEventClass();
113
                $formEvent->onPreSubmit($event);
114
            }
115
        }
116
    }
117
118
    public function onSubmit(FormEvent $event)
119
    {
@@ 118-128 (lines=11) @@
115
        }
116
    }
117
118
    public function onSubmit(FormEvent $event)
119
    {
120
        $events = self::getEvents();
121
122
        if (isset($events['onSubmit'])) {
123
            foreach ($events['onSubmit'] as $formEventClass) {
124
                $formEvent = new $formEventClass();
125
                $formEvent->onSubmit($event);
126
            }
127
        }
128
    }
129
130
    public function onPostSubmit(FormEvent $event)
131
    {
@@ 130-140 (lines=11) @@
127
        }
128
    }
129
130
    public function onPostSubmit(FormEvent $event)
131
    {
132
        $events = self::getEvents();
133
134
        if (isset($events['onPostSubmit'])) {
135
            foreach ($events['onPostSubmit'] as $formEventClass) {
136
                $formEvent = new $formEventClass();
137
                $formEvent->onPostSubmit($event);
138
            }
139
        }
140
    }
141
}
142