Composer Workspace global packages

This commit is contained in:
Clemens Schwaighofer
2023-08-02 14:52:33 +09:00
parent c383a7b7b7
commit 1fc144e178
239 changed files with 5659 additions and 2712 deletions

View File

@@ -74,6 +74,9 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
$this->symbolsMap = $symbolsMap ?? $this->symbolsMap;
}
/**
* @return void
*/
public function setLocale(string $locale)
{
$this->defaultLocale = $locale;
@@ -121,9 +124,7 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
// If the symbols map is passed as a closure, there is no need to fallback to the parent locale
// as the closure can just provide substitutions for all locales of interest.
$symbolsMap = $this->symbolsMap;
array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) {
return $symbolsMap($s, $locale);
});
array_unshift($transliterator, static fn ($s) => $symbolsMap($s, $locale));
}
$unicodeString = (new UnicodeString($string))->ascii($transliterator);