Code Duplication    Length = 8-8 lines in 2 locations

packages/analyzer/src/Declarations.php 1 location

@@ 56-63 (lines=8) @@
53
		);
54
55
		$valid_extensions = array( 'php' );
56
		foreach ( $iterator as $file ) {
57
			$parts             = explode( '.', $file );
58
			$current_extension = strtolower( array_pop( $parts ) );
59
60
			if ( in_array( $current_extension, $valid_extensions, true ) ) {
61
				$this->scan_file( $root, $file );
62
			}
63
		}
64
	}
65
66
	public function scan_file( $root, $file_path ) {

packages/analyzer/src/Invocations.php 1 location

@@ 55-62 (lines=8) @@
52
		);
53
54
		$valid_extensions = array( 'php' );
55
		foreach ( $iterator as $file ) {
56
			$parts             = explode( '.', $file );
57
			$current_extension = strtolower( array_pop( $parts ) );
58
59
			if ( in_array( $current_extension, $valid_extensions ) ) {
60
				$this->scan_file( $root, $file );
61
			}
62
		}
63
	}
64
65
	/**