Code Duplication    Length = 6-6 lines in 2 locations

projects/packages/changelogger/src/Utils.php 1 location

@@ 168-173 (lines=6) @@
165
		$ret   = array();
166
167
		$allFiles = array();
168
		foreach ( new \DirectoryIterator( $dir ) as $file ) {
169
			$name = $file->getBasename();
170
			if ( '.' !== $name[0] ) {
171
				$allFiles[ $name ] = $file->getPathname();
172
			}
173
		}
174
		asort( $allFiles );
175
		foreach ( $allFiles as $name => $path ) {
176
			$diagnostics = null;

projects/packages/changelogger/src/ValidateCommand.php 1 location

@@ 183-188 (lines=6) @@
180
		$files = $input->getArgument( 'files' );
181
		if ( ! $files ) {
182
			$files = array();
183
			foreach ( new \DirectoryIterator( Config::changesDir() ) as $file ) {
184
				$name = $file->getBasename();
185
				if ( '.' !== $name[0] ) {
186
					$files[] = $file->getPathname();
187
				}
188
			}
189
			sort( $files );
190
		}
191