From 1e195f2ab3ca4a878a5c7c0ecb29b39eb954ca3b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 31 Aug 2022 11:56:55 +0200 Subject: [PATCH] Fix --- src/Psalm/Storage/Assertion.php | 5 ++++- src/Psalm/Storage/Assertion/IsIdentical.php | 5 ++++- src/Psalm/Storage/Assertion/IsLooselyEqual.php | 5 ++++- src/Psalm/Storage/Assertion/IsNotIdentical.php | 5 ++++- src/Psalm/Storage/Assertion/IsNotLooselyEqual.php | 5 ++++- src/Psalm/Storage/Assertion/IsNotType.php | 5 ++++- src/Psalm/Storage/Assertion/IsType.php | 5 ++++- 7 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/Psalm/Storage/Assertion.php b/src/Psalm/Storage/Assertion.php index 5012866e43d..2fcc4324bbc 100644 --- a/src/Psalm/Storage/Assertion.php +++ b/src/Psalm/Storage/Assertion.php @@ -32,7 +32,10 @@ public function getAtomicType(): ?Atomic return null; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return $this; } diff --git a/src/Psalm/Storage/Assertion/IsIdentical.php b/src/Psalm/Storage/Assertion/IsIdentical.php index 0f33ac86e08..8730bda852d 100644 --- a/src/Psalm/Storage/Assertion/IsIdentical.php +++ b/src/Psalm/Storage/Assertion/IsIdentical.php @@ -37,7 +37,10 @@ public function getAtomicType(): ?Atomic return $this->type; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return new static($type); } diff --git a/src/Psalm/Storage/Assertion/IsLooselyEqual.php b/src/Psalm/Storage/Assertion/IsLooselyEqual.php index 6a2e80bcf8d..c0b23dbde7c 100644 --- a/src/Psalm/Storage/Assertion/IsLooselyEqual.php +++ b/src/Psalm/Storage/Assertion/IsLooselyEqual.php @@ -37,7 +37,10 @@ public function hasEquality(): bool return true; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return new static($type); } diff --git a/src/Psalm/Storage/Assertion/IsNotIdentical.php b/src/Psalm/Storage/Assertion/IsNotIdentical.php index 610d167ce22..978ca956df6 100644 --- a/src/Psalm/Storage/Assertion/IsNotIdentical.php +++ b/src/Psalm/Storage/Assertion/IsNotIdentical.php @@ -42,7 +42,10 @@ public function getAtomicType(): ?Atomic return $this->type; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return new static($type); } diff --git a/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php b/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php index 0b4717a0952..846afb19075 100644 --- a/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php +++ b/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php @@ -42,7 +42,10 @@ public function getAtomicType(): ?Atomic return $this->type; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return new static($type); } diff --git a/src/Psalm/Storage/Assertion/IsNotType.php b/src/Psalm/Storage/Assertion/IsNotType.php index 104ec10fcb8..24d1ee9c380 100644 --- a/src/Psalm/Storage/Assertion/IsNotType.php +++ b/src/Psalm/Storage/Assertion/IsNotType.php @@ -37,7 +37,10 @@ public function getAtomicType(): ?Atomic return $this->type; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return new static($type); } diff --git a/src/Psalm/Storage/Assertion/IsType.php b/src/Psalm/Storage/Assertion/IsType.php index 8e31e3a6faa..501a5e06cca 100644 --- a/src/Psalm/Storage/Assertion/IsType.php +++ b/src/Psalm/Storage/Assertion/IsType.php @@ -32,7 +32,10 @@ public function getAtomicType(): ?Atomic return $this->type; } - public function setAtomicType(Atomic $type): static + /** + * @return static + */ + public function setAtomicType(Atomic $type): self { return new static($type); }