Skip to content

Upstream metadata changes from Google for v9.0.35 #125

Upstream metadata changes from Google for v9.0.35

Upstream metadata changes from Google for v9.0.35 #125

Triggered via pull request July 17, 2026 13:08
Status Success
Total duration 7m 49s
Artifacts –

mutation-tests.yml

on: pull_request
Matrix: Mutation tests
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
Mutation tests (8.4, highest)
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809, actions/checkout@v4. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L304
Escaped Mutant for Mutator "MBString": @@ @@ $aPhoneNumber = $m->group(); // No formatting template can be created if the number of digits entered entered so far // is longer than the maximum the current formatting rule can accommodate. - if (mb_strlen($aPhoneNumber) < mb_strlen($this->nationalNumber)) { + if (mb_strlen($aPhoneNumber) < strlen($this->nationalNumber)) { return ''; } // Formats the number according to $numberFormat
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L304
Escaped Mutant for Mutator "MBString": @@ @@ $aPhoneNumber = $m->group(); // No formatting template can be created if the number of digits entered entered so far // is longer than the maximum the current formatting rule can accommodate. - if (mb_strlen($aPhoneNumber) < mb_strlen($this->nationalNumber)) { + if (strlen($aPhoneNumber) < mb_strlen($this->nationalNumber)) { return ''; } // Formats the number according to $numberFormat
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L284
Escaped Mutant for Mutator "Assignment": @@ @@ $this->formattingTemplate = ''; $tempTemplate = $this->getFormattingTemplate($numberPattern, $format->getFormat()); if ($tempTemplate !== '') { - $this->formattingTemplate .= $tempTemplate; + $this->formattingTemplate = $tempTemplate; return true; } return false;
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L266
Escaped Mutant for Mutator "Continue_": @@ @@ $indexOfLeadingDigitsPattern = mb_strlen($leadingDigits) - self::$minLeadingDigitsLength; foreach ($this->possibleFormats as $key => $format) { if ($format->leadingDigitsPatternSize() === 0) { - // Keep everything that isn't restricted by leading digits. - continue; + break; } $lastLeadingDigitsPattern = min($indexOfLeadingDigitsPattern, $format->leadingDigitsPatternSize() - 1); $leadingDigitsPattern = $format->getLeadingDigitsPattern($lastLeadingDigitsPattern);
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L261
Escaped Mutant for Mutator "MBString": @@ @@ } private function narrowDownPossibleFormats(string $leadingDigits): void { - $indexOfLeadingDigitsPattern = mb_strlen($leadingDigits) - self::$minLeadingDigitsLength; + $indexOfLeadingDigitsPattern = strlen($leadingDigits) - self::$minLeadingDigitsLength; foreach ($this->possibleFormats as $key => $format) { if ($format->leadingDigitsPatternSize() === 0) { // Keep everything that isn't restricted by leading digits.
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L247
Escaped Mutant for Mutator "Continue_": @@ @@ continue; } if ($this->extractedNationalPrefix === '' && !$this->isCompleteNumber && !PhoneNumberUtil::formattingRuleHasFirstGroupOnly($format->getNationalPrefixFormattingRule()) && !$format->getNationalPrefixOptionalWhenFormatting()) { - // This number was entered without a national prefix, and this formatting rule requires one, - // so we discard it. - continue; + break; } $eligibleFormatMatcher = new Matcher(self::$eligibleFormatPattern, $format->getFormat()); if ($eligibleFormatMatcher->matches()) {
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L211
Escaped Mutant for Mutator "FalseValue": @@ @@ unset($this->possibleFormats[$key]); } $this->ableToFormat = false; - return false; + return true; } private function getAvailableFormats(string $leadingDigits): void {
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L192
Escaped Mutant for Mutator "ReturnRemoval": @@ @@ foreach ($this->possibleFormats as $key => $numberFormat) { $pattern = $numberFormat->getPattern(); if ($this->currentFormattingPattern === $pattern) { - return false; + } if ($this->createFormattingTemplate($numberFormat)) { $this->currentFormattingPattern = $pattern;
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L163
Escaped Mutant for Mutator "UnwrapStrToUpper": @@ @@ { self::init(); $this->phoneUtil = PhoneNumberUtil::getInstance(); - $this->defaultCountry = strtoupper($regionCode); + $this->defaultCountry = $regionCode; $this->currentMetadata = $this->getMetadataForRegion($this->defaultCountry); $this->defaultMetadata = $this->currentMetadata; }
Mutation tests (8.4, highest): src/AsYouTypeFormatter.php#L149
Escaped Mutant for Mutator "TrueValue": @@ @@ self::$emptyMetadata = new PhoneMetadata(); self::$emptyMetadata->setInternationalPrefix('NA'); self::$eligibleFormatPattern = '[' . PhoneNumberUtil::VALID_PUNCTUATION . ']*' . '\$1' . '[' . PhoneNumberUtil::VALID_PUNCTUATION . ']*(\$\d' . '[' . PhoneNumberUtil::VALID_PUNCTUATION . ']*)*'; - self::$initialised = true; + self::$initialised = false; } } /**