Code Duplication    Length = 15-16 lines in 2 locations

RoboFile.php 1 location

@@ 2-16 (lines=15) @@
1
<?php declare(strict_types=1);
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.

build/update_header_comments.php 1 location

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