Skip to content

Commit

Permalink
General maintenance.
Browse files Browse the repository at this point in the history
  • Loading branch information
Syndesi committed Dec 3, 2023
1 parent c0ecbcb commit 70bd915
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"authors": [
{
"name": "Syndesi (Sören Klein)",
"email": "[email protected]",
"homepage": "https://syndesi.dev",
"role": "Developer"
"email": "[email protected]"
}
],
"keywords": [
Expand All @@ -32,15 +30,16 @@
}
},
"require-dev": {
"vimeo/psalm": "^4.23",
"vimeo/psalm": "^5.0",
"boesing/psalm-plugin-stringf": "^1.1",
"phpstan/phpstan": "^1.6",
"phpunit/php-code-coverage": "^9.2",
"infection/infection": "^0.26.10",
"infection/infection": "^0.27.0",
"friendsofphp/php-cs-fixer": "^3.8",
"phpunit/phpunit": "^9.5",
"roave/no-leaks": "^1.3",
"phpbench/phpbench": "^1.2"
"phpbench/phpbench": "^1.2",
"infection/codeception-adapter": "^0.4.2"
},
"scripts": {
"test": "php vendor/phpunit/phpunit/phpunit",
Expand Down
4 changes: 2 additions & 2 deletions src/Type/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public function addRelation(RelationInterface $relation): self
}

$ownIdentifyingString = ToStringHelper::nodeToString($this, true);

Check warning on line 85 in src/Type/Node.php

View workflow job for this annotation

GitHub Actions / Running mutant tests for PHP 8.1

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ if (!$endNode) { throw new InvalidArgumentException("End node must be set"); } - $ownIdentifyingString = ToStringHelper::nodeToString($this, true); + $ownIdentifyingString = ToStringHelper::nodeToString($this, false); if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself."); }

Check warning on line 85 in src/Type/Node.php

View workflow job for this annotation

GitHub Actions / Running mutant tests for PHP 8.1

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ if (!$endNode) { throw new InvalidArgumentException("End node must be set"); } - $ownIdentifyingString = ToStringHelper::nodeToString($this, true); + $ownIdentifyingString = ToStringHelper::nodeToString($this, false); if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself."); }
if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString &&
ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString
if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString

Check warning on line 86 in src/Type/Node.php

View workflow job for this annotation

GitHub Actions / Running mutant tests for PHP 8.1

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ throw new InvalidArgumentException("End node must be set"); } $ownIdentifyingString = ToStringHelper::nodeToString($this, true); - if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { + if (ToStringHelper::nodeToString($startNode, false) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself."); } $this->relations[] = $relation;

Check warning on line 86 in src/Type/Node.php

View workflow job for this annotation

GitHub Actions / Running mutant tests for PHP 8.1

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ throw new InvalidArgumentException("End node must be set"); } $ownIdentifyingString = ToStringHelper::nodeToString($this, true); - if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { + if (ToStringHelper::nodeToString($startNode, false) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself."); } $this->relations[] = $relation;
&& ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString

Check warning on line 87 in src/Type/Node.php

View workflow job for this annotation

GitHub Actions / Running mutant tests for PHP 8.1

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ throw new InvalidArgumentException("End node must be set"); } $ownIdentifyingString = ToStringHelper::nodeToString($this, true); - if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { + if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, false) !== $ownIdentifyingString) { throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself."); } $this->relations[] = $relation;

Check warning on line 87 in src/Type/Node.php

View workflow job for this annotation

GitHub Actions / Running mutant tests for PHP 8.1

Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ throw new InvalidArgumentException("End node must be set"); } $ownIdentifyingString = ToStringHelper::nodeToString($this, true); - if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, true) !== $ownIdentifyingString) { + if (ToStringHelper::nodeToString($startNode, true) !== $ownIdentifyingString && ToStringHelper::nodeToString($endNode, false) !== $ownIdentifyingString) { throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself."); } $this->relations[] = $relation;
) {
throw new InvalidArgumentException("Adding a relation to a node requires that either the start node or the end node must be the same as the node itself.");
}
Expand Down

0 comments on commit 70bd915

Please sign in to comment.