Skip to content

Updated dependencies, improved parsing of type references #218

Updated dependencies, improved parsing of type references

Updated dependencies, improved parsing of type references #218

Triggered via push November 10, 2023 14:45
Status Failure
Total duration 32s
Artifacts

php.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 13 warnings
codestyle
Process completed with exit code 2.
phpstan: src/Parser.php#L331
Method Graphpinator\Parser\Parser::parseType() invoked with 1 parameter, 0 required.
phpstan: src/Parser.php#L492
Method Graphpinator\Parser\Parser::parseType() invoked with 1 parameter, 0 required.
phpstan
Process completed with exit code 1.
mutation
Process completed with exit code 1.
codestyle
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
phpstan
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
tests
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, codecov/codecov-action@v1.0.14. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
mutation
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
mutation: src/Exception/ParserError.php#L13
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function __construct(\Graphpinator\Common\Location $location, array $messageArgs = []) { parent::__construct($messageArgs); - $this->setLocation($location); + } public final function isOutputable() : bool {
mutation: src/Parser.php#L29
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ { $this->tokenizer = new \Graphpinator\Parser\TokenContainer($source); if ($this->tokenizer->isEmpty()) { - throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(1, 1)); + throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(0, 1)); } $fragments = []; $locations = [];
mutation: src/Parser.php#L29
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ { $this->tokenizer = new \Graphpinator\Parser\TokenContainer($source); if ($this->tokenizer->isEmpty()) { - throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(1, 1)); + throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(2, 1)); } $fragments = []; $locations = [];
mutation: src/Parser.php#L29
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ { $this->tokenizer = new \Graphpinator\Parser\TokenContainer($source); if ($this->tokenizer->isEmpty()) { - throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(1, 1)); + throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(1, 0)); } $fragments = []; $locations = [];
mutation: src/Parser.php#L29
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ { $this->tokenizer = new \Graphpinator\Parser\TokenContainer($source); if ($this->tokenizer->isEmpty()) { - throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(1, 1)); + throw new \Graphpinator\Parser\Exception\EmptyRequest(new \Graphpinator\Common\Location(1, 2)); } $fragments = []; $locations = [];
mutation: src/Parser.php#L207
Escaped Mutant for Mutator "DoWhile": --- Original +++ New @@ @@ default: throw new \Graphpinator\Parser\Exception\ExpectedSelectionSetBody($this->tokenizer->getNext()->getLocation(), $this->tokenizer->getCurrent()->getType()); } - } while ($this->tokenizer->peekNext()->getType() !== TokenType::CUR_C); + } while (false); $this->tokenizer->getNext(); return new \Graphpinator\Parser\Field\FieldSet($fields, new \Graphpinator\Parser\FragmentSpread\FragmentSpreadSet($fragments)); }
mutation: src/Parser.php#L331
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ } $name = $this->tokenizer->getCurrent()->getValue(); $this->tokenizer->assertNext(TokenType::COLON, \Graphpinator\Parser\Exception\ExpectedColon::class); - $type = $this->parseType(false); + $type = $this->parseType(true); $default = null; if ($this->tokenizer->peekNext()->getType() === TokenType::EQUAL) { $this->tokenizer->getNext();
mutation: src/Parser.php#L492
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $type = new \Graphpinator\Parser\TypeRef\NamedTypeRef($this->tokenizer->getCurrent()->getValue()); break; case TokenType::SQU_O: - $type = new \Graphpinator\Parser\TypeRef\ListTypeRef($this->parseType(false)); + $type = new \Graphpinator\Parser\TypeRef\ListTypeRef($this->parseType(true)); $this->tokenizer->assertNext(TokenType::SQU_C, \Graphpinator\Parser\Exception\ExpectedClosingBracket::class); break; default:
mutation: src/Value/ObjectVal.php#L24
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ public function getRawValue() : \stdClass { $return = new \stdClass(); - foreach ((array) $this->value as $key => $value) { + foreach ($this->value as $key => $value) { \assert($value instanceof Value); $return->{$key} = $value->getRawValue(); }