From 70bd915d08827814ae3dee524f5d4429557e5278 Mon Sep 17 00:00:00 2001 From: Syndesi Date: Sun, 3 Dec 2023 10:34:23 +0100 Subject: [PATCH] General maintenance. --- composer.json | 11 +++++------ src/Type/Node.php | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 144adc3..988263c 100755 --- a/composer.json +++ b/composer.json @@ -7,9 +7,7 @@ "authors": [ { "name": "Syndesi (Sören Klein)", - "email": "soerenklein98@gmail.com", - "homepage": "https://syndesi.dev", - "role": "Developer" + "email": "soerenklein98@gmail.com" } ], "keywords": [ @@ -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", diff --git a/src/Type/Node.php b/src/Type/Node.php index 5b5f28a..9e12e64 100644 --- a/src/Type/Node.php +++ b/src/Type/Node.php @@ -83,8 +83,8 @@ public function addRelation(RelationInterface $relation): self } $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, 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."); }