core/NavbarWalker.php
public function end_el(&$output, $item, $depth = 0, $args = [])
    {
        if ($depth === 0 && in_array('menu-item-has-children', $item->classes)) {
            $indent = str_repeat('    ', $this->indent + $depth);
            $output .= sprintf('%s</li>%s', $indent, PHP_EOL);
        } else {
            $output .= sprintf('</li>%s', PHP_EOL);
        }
    }
public function end_el(&$output, $item, $depth = 0, $args = [])
    {
        if ($depth === 0 && in_array('menu-item-has-children', $item->classes)) {
            $indent = str_repeat('    ', $this->indent + $depth);
            $output .= sprintf('%s</li>%s', $indent, PHP_EOL);
        } else {
            $output .= sprintf('</li>%s', PHP_EOL);
        }
    }
public function end_el ( & $ output , $ item , $ depth = 0 , $ args = [ ] ) { if ( $ depth === 0 && in_array ( 'menu-item-has-children' , $ item -> classes ) ) { $ indent = str_repeat ( '    ' , $ this -> indent + $ depth ) ; $ output .= sprintf ( '%s</li>%s' , $ indent , PHP_EOL ) ; } else { $ output .= sprintf ( '</li>%s' , PHP_EOL ) ; } }
Ends the element output, if needed

@param string  $output Passed by reference. Used to append additional content.
@param object  $item   Page data object. Not used.
@param integer $depth  Depth of page. Not Used.
@param array   $args   An array of arguments.

@see \Walker::end_el()
Ends the element output if needed