Code Duplication    Length = 7-9 lines in 3 locations

src/Kunstmaan/NodeBundle/Helper/NodeMenu.php 2 locations

@@ 224-232 (lines=9) @@
221
                $includeHiddenFromNav = $this->includeHiddenFromNav;
222
                $this->topNodeMenuItems = array_filter(
223
                    $topNodeMenuItems,
224
                    function (NodeMenuItem $entry) use ($includeHiddenFromNav) {
225
                        if ($entry->getNode()->isHiddenFromNav() && !$includeHiddenFromNav) {
226
                            return false;
227
                        }
228
229
                        return true;
230
                    }
231
                );
232
            }
233
        }
234
235
        return $this->topNodeMenuItems;
@@ 335-343 (lines=9) @@
332
333
            $children = array_filter(
334
                $children,
335
                function (NodeMenuItem $entry) use ($includeHiddenFromNav) {
336
                    if ($entry->getNode()->isHiddenFromNav() && !$includeHiddenFromNav) {
337
                        return false;
338
                    }
339
340
                    return true;
341
                }
342
            );
343
        }
344
345
        return $children;
346
    }

src/Kunstmaan/NodeBundle/Helper/NodeMenuItem.php 1 location

@@ 219-225 (lines=7) @@
216
            $this->children = $children;
217
        }
218
219
        return array_filter($this->children, function (NodeMenuItem $entry) use ($includeHiddenFromNav) {
220
            if ($entry->getNode()->isHiddenFromNav() && !$includeHiddenFromNav) {
221
                return false;
222
            }
223
224
            return true;
225
        });
226
    }
227
228
    /**