Code Duplication    Length = 11-11 lines in 5 locations

src/Eccube/Event/FormEventSubscriber.php 5 locations

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