Code Duplication    Length = 8-10 lines in 2 locations

includes/class-sensei-lesson.php 2 locations

@@ 627-636 (lines=10) @@
624
			} // End If Statement
625
626
			$question_count = 0;
627
			foreach( $questions as $question ) {
628
629
				if( $question->post_type == 'multiple_question' ) {
630
					$question_number = get_post_meta( $question->ID, 'number', true );
631
					$question_count += $question_number;
632
				} else {
633
					++$question_count;
634
				}
635
636
			}
637
638
			// Inner DIV
639
			$html .= '<div id="add-quiz-metadata"' . $quiz_class . '>';
@@ 1634-1641 (lines=8) @@
1631
1632
		// Count questions
1633
		$question_count = 0;
1634
		foreach( $questions as $question ) {
1635
			if( $question->post_type == 'multiple_question' ) {
1636
				$question_number = get_post_meta( $question->ID, 'number', true );
1637
				$question_count += $question_number;
1638
			} else {
1639
				++$question_count;
1640
			}
1641
		}
1642
1643
		$settings = array(
1644
			array(