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

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