Skip to content

Commit

Permalink
Changed property name to allowlist in ChoiceAttributeExtractor
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed May 28, 2024
1 parent 0bc1944 commit b928b0f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/Translation/Extractor/ChoiceAttributeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ final class ChoiceAttributeExtractor implements ExtractorInterface
private string $domain;

/** @var string[] */
private array $whitelist;
private array $allowlist;

/**
* @param array<string, mixed> $customTags Custom tags definitions
* @param string $domain Target translation domain
* @param string[] $whitelist Whitelist of custom tags to extract
* @param string[] $allowlist Whitelist of custom tags to extract
*/
public function __construct(array $customTags, string $domain, array $whitelist = [])
public function __construct(array $customTags, string $domain, array $allowlist = [])
{
$this->customTags = $customTags;
$this->domain = $domain;
$this->whitelist = $whitelist;
$this->allowlist = $allowlist;
}

public function extract(): MessageCatalogue
{
$catalogue = new MessageCatalogueBuilder($this->domain);
foreach ($this->customTags as $tagName => $customTag) {
if (!in_array($tagName, $this->whitelist, true)) {
if (!in_array($tagName, $this->allowlist, true)) {
continue;
}

Expand Down

0 comments on commit b928b0f

Please sign in to comment.