Skip to content

Bump phpstan/phpstan from 1.10.41 to 2.1.1 #89

Bump phpstan/phpstan from 1.10.41 to 2.1.1

Bump phpstan/phpstan from 1.10.41 to 2.1.1 #89

Triggered via pull request January 20, 2025 08:59
Status Failure
Total duration 1m 19s
Artifacts

php.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

1 error and 13 warnings
codestyle
Process completed with exit code 2.
tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
codestyle
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
mutation
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
mutation: src/HtmlVisitor.php#L18
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ private FieldCollector $fieldCollector; public function __construct(?FieldCollector $fieldCollector = null) { - $this->fieldCollector = $fieldCollector ?? new AllFieldCollector(); + $this->fieldCollector = new AllFieldCollector() ?? $fieldCollector; } public function visitSchema(\Graphpinator\Typesystem\Schema $schema) : string {
mutation: src/HtmlVisitor.php#L248
Escaped Mutant for Mutator "Assignment": --- Original +++ New @@ @@ $defaultValue = ''; $link = '<span class="argument-type">' . self::printTypeLink($argument->getType()) . '</span>'; if ($argument->getDefaultValue() instanceof \Graphpinator\Value\ArgumentValue) { - $defaultValue .= '&nbsp;<span class="equals">=</span>&nbsp;'; + $defaultValue = '&nbsp;<span class="equals">=</span>&nbsp;'; $defaultValue .= '<span class="argument-value">' . $this->printValue($argument->getDefaultValue()->getValue()) . '</span>'; } return <<<EOL
mutation: src/HtmlVisitor.php#L272
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ foreach ($directiveUsage->getArgumentValues() as $argument) { // do not print default value if ($argument->getValue()->getRawValue() === $argument->getArgument()->getDefaultValue()?->getValue()->getRawValue()) { - continue; + break; } $printableArgument = '<span class="argument-name">' . $argument->getArgument()->getName() . '</span>'; $printableArgument .= '<span class="colon">:</span>&nbsp;';
mutation: src/HtmlVisitor.php#L310
Escaped Mutant for Mutator "UnwrapStrReplace": --- Original +++ New @@ @@ // Replace whitespace between tags but leave out &nbsp; $html = \preg_replace('/>((\\s+(&nbsp;){1}\\s*)|(\\s*(&nbsp;){1}\\s+))</', '>&nbsp;<', $html); // Replace empty line div with empty line containing &nbsp; (empty divs are ignored by browsers) - return \str_replace('<div class="line"></div>', self::emptyLine(), $html); + return $html; } /** * @return array<string>
mutation: src/HtmlVisitor.php#L372
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $result = ''; $matches = []; \preg_match_all('/(<a .+?<\\/a>)/', $schemaString, $matches); - foreach ($matches[0] as $index => $match) { + foreach ($matches[1] as $index => $match) { $match = \preg_replace('/(?<=>).*?(?=<)/', self::LINK_TEXTS[$index], $match); $match = \preg_replace('/(?<=title=").*?(?=")/', self::LINK_TITLES[$index], $match); $match = \str_replace('class="typename"', 'class="floating-button"', $match);
mutation: src/HtmlVisitor.php#L376
Escaped Mutant for Mutator "Assignment": --- Original +++ New @@ @@ $match = \preg_replace('/(?<=>).*?(?=<)/', self::LINK_TEXTS[$index], $match); $match = \preg_replace('/(?<=title=").*?(?=")/', self::LINK_TITLES[$index], $match); $match = \str_replace('class="typename"', 'class="floating-button"', $match); - $result .= $match; + $result = $match; } return <<<EOL <div class="floating-container">
mutation: src/HtmlVisitor.php#L414
Escaped Mutant for Mutator "Assignment": --- Original +++ New @@ @@ { $return = ''; foreach ($set as $directiveUsage) { - $return .= $directiveUsage->accept($this); + $return = $directiveUsage->accept($this); } return $return; }
mutation: src/HtmlVisitor.php#L425
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ private function printItems(\Graphpinator\Typesystem\Field\FieldSet|\Graphpinator\Typesystem\Argument\ArgumentSet|\Graphpinator\Typesystem\EnumItem\EnumItemSet $set) : string { $result = ''; - $previousHasDescription = false; + $previousHasDescription = true; $isFirst = true; foreach ($set as $item) { $currentHasDescription = $item->getDescription() !== null;
mutation: src/HtmlVisitor.php#L445
Escaped Mutant for Mutator "MatchArmRemoval": --- Original +++ New @@ @@ { $className = match ($value::class) { \Graphpinator\Value\NullInputedValue::class => 'null', - \Graphpinator\Value\EnumValue::class => 'enum-literal', \Graphpinator\Value\ScalarValue::class => match (\get_debug_type($value->getRawValue())) { 'bool' => $value->getRawValue() ? 'true' : 'false', 'int' => 'int-literal',
mutation: src/HtmlVisitor.php#L448
Escaped Mutant for Mutator "MatchArmRemoval": --- Original +++ New @@ @@ \Graphpinator\Value\EnumValue::class => 'enum-literal', \Graphpinator\Value\ScalarValue::class => match (\get_debug_type($value->getRawValue())) { 'bool' => $value->getRawValue() ? 'true' : 'false', - 'int' => 'int-literal', 'float' => 'float-literal', 'string' => 'string-literal', },