Code Duplication    Length = 7-7 lines in 4 locations

src/wp-includes/class-walker-nav-menu.php 4 locations

@@ 53-59 (lines=7) @@
50
	 * @param stdClass $args   An object of wp_nav_menu() arguments.
51
	 */
52
	public function start_lvl( &$output, $depth = 0, $args = array() ) {
53
		if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
54
			$t = '';
55
			$n = '';
56
		} else {
57
			$t = "\t";
58
			$n = "\n";
59
		}
60
		$indent = str_repeat( $t, $depth );
61
62
		// Default class.
@@ 92-98 (lines=7) @@
89
	 * @param stdClass $args   An object of wp_nav_menu() arguments.
90
	 */
91
	public function end_lvl( &$output, $depth = 0, $args = array() ) {
92
		if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
93
			$t = '';
94
			$n = '';
95
		} else {
96
			$t = "\t";
97
			$n = "\n";
98
		}
99
		$indent = str_repeat( $t, $depth );
100
		$output .= "$indent</ul>{$n}";
101
	}
@@ 118-124 (lines=7) @@
115
	 * @param int      $id     Current item ID.
116
	 */
117
	public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
118
		if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
119
			$t = '';
120
			$n = '';
121
		} else {
122
			$t = "\t";
123
			$n = "\n";
124
		}
125
		$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
126
127
		$classes = empty( $item->classes ) ? array() : (array) $item->classes;
@@ 256-262 (lines=7) @@
253
	 * @param stdClass $args   An object of wp_nav_menu() arguments.
254
	 */
255
	public function end_el( &$output, $item, $depth = 0, $args = array() ) {
256
		if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
257
			$t = '';
258
			$n = '';
259
		} else {
260
			$t = "\t";
261
			$n = "\n";
262
		}
263
		$output .= "</li>{$n}";
264
	}
265