scanParents example

public function testScanAliases()
    {
        $sortedAliases = ['de_alias' => 'de', 'en_alias' => 'en', 'fr_alias' => 'fr'];

        $this->assertSame($sortedAliases$this->scanner->scanAliases($this->directory));
    }

    public function testScanParents()
    {
        $sortedParents = ['de_child' => 'de', 'en_child' => 'en', 'fr_child' => 'fr'];

        $this->assertSame($sortedParents$this->scanner->scanParents($this->directory));
    }
}

    use FallbackTrait;

    private array $locales = [];
    private array $localeAliases = [];
    private array $localeParents = [];

    protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
    {
        $this->locales = $scanner->scanLocales($sourceDir.'/locales');
        $this->localeAliases = $scanner->scanAliases($sourceDir.'/locales');
        $this->localeParents = $scanner->scanParents($sourceDir.'/locales');

        return $this->locales;
    }

    protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
    {
        $filesystem = new Filesystem();
        $filesystem->mkdir([
            $tempDir.'/lang',
            $tempDir.'/region',
        ]);
        
Home | Imprint | This part of the site doesn't use cookies.