src/Lib/RelativeScanner.php
protected static function stripAbsolutePath(array $paths, $plugin = null): array
    {
        foreach (App::path('Template', $plugin) as $templatesPath) {
            array_walk($paths, function (&$path) use ($templatesPath) {
                if (substr($path, 0, strlen($templatesPath)) == $templatesPath) {
                    $path = substr($path, strlen($templatesPath));
                }
            });
        }

        return $paths;
    }
protected static function stripAbsolutePath(array $paths, $plugin = null): array
    {
        foreach (App::path('Template', $plugin) as $templatesPath) {
            array_walk($paths, function (&$path) use ($templatesPath) {
                if (substr($path, 0, strlen($templatesPath)) == $templatesPath) {
                    $path = substr($path, strlen($templatesPath));
                }
            });
        }

        return $paths;
    }
protected static function stripAbsolutePath ( array $ paths , $ plugin = null ) : array { foreach ( App :: path ( 'Template' , $ plugin ) as $ templatesPath ) { array_walk ( $ paths , function ( & $ path ) use ( $ templatesPath ) { if ( substr ( $ path , 0 , strlen ( $ templatesPath ) ) == $ templatesPath ) { $ path = substr ( $ path , strlen ( $ templatesPath ) ) ; } } ) ; } return $ paths ; }
Strip the absolute path of template's paths.

@param array       $paths  Paths to strip.
@param string|null $plugin Hold plugin name or null for App.

@return array
Strip the absolute path of template s paths .