Code Duplication    Length = 15-16 lines in 2 locations

build/update_header_comments.php 1 location

@@ 11-26 (lines=16) @@
8
	'tests/**/*.php',
9
];
10
11
if ( ! function_exists('glob_recursive'))
12
{
13
	// Does not support flag GLOB_BRACE
14
15
	function glob_recursive($pattern, $flags = 0)
16
	{
17
		$files = glob($pattern, $flags);
18
19
		foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir)
20
		{
21
			$files = array_merge($files, glob_recursive($dir . '/' . basename($pattern), $flags));
22
		}
23
24
		return $files;
25
	}
26
}
27
28
function get_text_to_replace($tokens)
29
{

RoboFile.php 1 location

@@ 2-16 (lines=15) @@
1
<?php
2
if ( ! function_exists('glob_recursive'))
3
{
4
	// Does not support flag GLOB_BRACE
5
	function glob_recursive($pattern, $flags = 0)
6
	{
7
		$files = glob($pattern, $flags);
8
9
		foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir)
10
		{
11
			$files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));
12
		}
13
14
		return $files;
15
	}
16
}
17
18
/**
19
 * This is project's console commands configuration for Robo task runner.