Code Duplication    Length = 7-7 lines in 2 locations

src/CRUDlex/AbstractData.php 1 location

@@ 274-280 (lines=7) @@
271
     * @return \Closure|null
272
     * the popped event or null if no event was available.
273
     */
274
    public function popEvent($moment, $action)
275
    {
276
        if (array_key_exists($moment.'.'.$action, $this->events)) {
277
            return array_pop($this->events[$moment.'.'.$action]);
278
        }
279
        return null;
280
    }
281
282
283
    /**

src/CRUDlex/EntityEvents.php 1 location

@@ 88-94 (lines=7) @@
85
     * @return \Closure|null
86
     * the popped event or null if no event was available.
87
     */
88
    public function popEvent($moment, $action)
89
    {
90
        if (array_key_exists($moment.'.'.$action, $this->events)) {
91
            return array_pop($this->events[$moment.'.'.$action]);
92
        }
93
        return null;
94
    }
95
}