Code Duplication    Length = 15-16 lines in 2 locations

build/update_header_comments.php 1 location

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

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.