Skip to content

Merge pull request #60 from giggsey/smaller-metadata #133

Merge pull request #60 from giggsey/smaller-metadata

Merge pull request #60 from giggsey/smaller-metadata #133

Triggered via push April 29, 2024 16:38
Status Success
Total duration 3m 52s
Artifacts
Matrix: Mutation tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation tests (8.3, highest): src/MultiFileMetadataSourceImpl.php#L79
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ $isNonGeoRegion = PhoneNumberUtil::REGION_CODE_FOR_NON_GEO_ENTITY === $regionCode; $fileName = $filePrefix . '_' . ($isNonGeoRegion ? $countryCallingCode : $regionCode) . '.php'; if (!is_readable($fileName)) { - throw new \RuntimeException('missing metadata: ' . $fileName); + throw new \RuntimeException($fileName . 'missing metadata: '); } $data = $metadataLoader->loadMetadata($fileName); $metadata = new PhoneMetadata();
Mutation tests (8.3, highest): src/MultiFileMetadataSourceImpl.php#L79
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ $isNonGeoRegion = PhoneNumberUtil::REGION_CODE_FOR_NON_GEO_ENTITY === $regionCode; $fileName = $filePrefix . '_' . ($isNonGeoRegion ? $countryCallingCode : $regionCode) . '.php'; if (!is_readable($fileName)) { - throw new \RuntimeException('missing metadata: ' . $fileName); + throw new \RuntimeException($fileName); } $data = $metadataLoader->loadMetadata($fileName); $metadata = new PhoneMetadata();
Mutation tests (8.3, highest): src/NumberFormat.php#L58
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ $this->domesticCarrierCodeFormattingRule = ''; return $this; } - public function hasPattern(): bool + protected function hasPattern(): bool { return $this->hasPattern; }
Mutation tests (8.3, highest): src/NumberFormat.php#L76
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ $this->pattern = $value; return $this; } - public function hasNationalPrefixOptionalWhenFormatting(): bool + protected function hasNationalPrefixOptionalWhenFormatting(): bool { return $this->hasNationalPrefixOptionalWhenFormatting; }
Mutation tests (8.3, highest): src/NumberFormat.php#L135
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ $this->leadingDigitsPattern[] = $value; return $this; } - public function hasNationalPrefixFormattingRule(): bool + protected function hasNationalPrefixFormattingRule(): bool { return $this->hasNationalPrefixFormattingRule; }
Mutation tests (8.3, highest): src/NumberFormat.php#L160
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ $this->nationalPrefixFormattingRule = ''; return $this; } - public function hasDomesticCarrierCodeFormattingRule(): bool + protected function hasDomesticCarrierCodeFormattingRule(): bool { return $this->hasDomesticCarrierCodeFormattingRule; }
Mutation tests (8.3, highest): src/NumberFormat.php#L193
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ if ($other->hasNationalPrefixFormattingRule()) { $this->setNationalPrefixFormattingRule($other->getNationalPrefixFormattingRule()); } - if ($other->hasDomesticCarrierCodeFormattingRule()) { + if (!$other->hasDomesticCarrierCodeFormattingRule()) { $this->setDomesticCarrierCodeFormattingRule($other->getDomesticCarrierCodeFormattingRule()); } if ($other->hasNationalPrefixOptionalWhenFormatting()) {
Mutation tests (8.3, highest): src/NumberFormat.php#L194
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $this->setNationalPrefixFormattingRule($other->getNationalPrefixFormattingRule()); } if ($other->hasDomesticCarrierCodeFormattingRule()) { - $this->setDomesticCarrierCodeFormattingRule($other->getDomesticCarrierCodeFormattingRule()); + } if ($other->hasNationalPrefixOptionalWhenFormatting()) { $this->setNationalPrefixOptionalWhenFormatting($other->getNationalPrefixOptionalWhenFormatting());
Mutation tests (8.3, highest): src/NumberFormat.php#L223
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ if ($this->hasDomesticCarrierCodeFormattingRule()) { $output['domesticCarrierCodeFormattingRule'] = $this->getDomesticCarrierCodeFormattingRule(); } - if ($this->hasNationalPrefixOptionalWhenFormatting() && $this->getNationalPrefixOptionalWhenFormatting() !== false) { + if ($this->hasNationalPrefixOptionalWhenFormatting() || $this->getNationalPrefixOptionalWhenFormatting() !== false) { $output['nationalPrefixOptionalWhenFormatting'] = $this->getNationalPrefixOptionalWhenFormatting(); } return $output;
Mutation tests (8.3, highest): src/PhoneMetadata.php#L70
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ { return $this->mainCountryForCode; } - public function getMainCountryForCode(): bool + protected function getMainCountryForCode(): bool { return $this->mainCountryForCode; }