Skip to content

Commit e50db5d

Browse files
committed
Rename method
1 parent 4b0125b commit e50db5d

23 files changed

+31
-31
lines changed

src/Reflection/Annotations/AnnotationMethodReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function getAttributes(): array
183183
return [];
184184
}
185185

186-
public function hasNoDiscardAttribute(): TrinaryLogic
186+
public function mustUseReturnValue(): TrinaryLogic
187187
{
188188
return TrinaryLogic::createNo();
189189
}

src/Reflection/Dummy/ChangedTypeMethodReflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ public function getAttributes(): array
172172
return $this->reflection->getAttributes();
173173
}
174174

175-
public function hasNoDiscardAttribute(): TrinaryLogic
175+
public function mustUseReturnValue(): TrinaryLogic
176176
{
177-
return $this->reflection->hasNoDiscardAttribute();
177+
return $this->reflection->mustUseReturnValue();
178178
}
179179

180180
}

src/Reflection/Dummy/DummyConstructorReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function getAttributes(): array
157157
return [];
158158
}
159159

160-
public function hasNoDiscardAttribute(): TrinaryLogic
160+
public function mustUseReturnValue(): TrinaryLogic
161161
{
162162
// Align with the getAttributes() returning empty
163163
return TrinaryLogic::createNo();

src/Reflection/Dummy/DummyMethodReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function getAttributes(): array
149149
return [];
150150
}
151151

152-
public function hasNoDiscardAttribute(): TrinaryLogic
152+
public function mustUseReturnValue(): TrinaryLogic
153153
{
154154
// Align with the getAttributes() returning empty
155155
return TrinaryLogic::createNo();

src/Reflection/ExtendedMethodReflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ public function getAttributes(): array;
6767

6868
/**
6969
* Has the #[\NoDiscard] attribute - on PHP 8.5+ if the function's return
70-
* value is unused at runtime a warning is emitted, phpstan will emit the
70+
* value is unused at runtime a warning is emitted, PHPStan will emit the
7171
* warning during analysis and on older PHP versions too
7272
*/
73-
public function hasNoDiscardAttribute(): TrinaryLogic;
73+
public function mustUseReturnValue(): TrinaryLogic;
7474

7575
}

src/Reflection/FunctionReflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public function getAttributes(): array;
6464

6565
/**
6666
* Has the #[\NoDiscard] attribute - on PHP 8.5+ if the function's return
67-
* value is unused at runtime a warning is emitted, phpstan will emit the
67+
* value is unused at runtime a warning is emitted, PHPStan will emit the
6868
* warning during analysis and on older PHP versions too
6969
*/
70-
public function hasNoDiscardAttribute(): TrinaryLogic;
70+
public function mustUseReturnValue(): TrinaryLogic;
7171

7272
}

src/Reflection/Native/NativeFunctionReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function getAttributes(): array
151151
return $this->attributes;
152152
}
153153

154-
public function hasNoDiscardAttribute(): TrinaryLogic
154+
public function mustUseReturnValue(): TrinaryLogic
155155
{
156156
foreach ($this->attributes as $attrib) {
157157
if (strtolower($attrib->getName()) === 'nodiscard') {

src/Reflection/Native/NativeMethodReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public function getAttributes(): array
227227
return $this->attributes;
228228
}
229229

230-
public function hasNoDiscardAttribute(): TrinaryLogic
230+
public function mustUseReturnValue(): TrinaryLogic
231231
{
232232
foreach ($this->attributes as $attrib) {
233233
if (strtolower($attrib->getName()) === 'nodiscard') {

src/Reflection/Php/ClosureCallMethodReflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ public function getAttributes(): array
202202
return $this->nativeMethodReflection->getAttributes();
203203
}
204204

205-
public function hasNoDiscardAttribute(): TrinaryLogic
205+
public function mustUseReturnValue(): TrinaryLogic
206206
{
207-
return $this->nativeMethodReflection->hasNoDiscardAttribute();
207+
return $this->nativeMethodReflection->mustUseReturnValue();
208208
}
209209

210210
}

src/Reflection/Php/EnumCasesMethodReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function getAttributes(): array
161161
return [];
162162
}
163163

164-
public function hasNoDiscardAttribute(): TrinaryLogic
164+
public function mustUseReturnValue(): TrinaryLogic
165165
{
166166
return TrinaryLogic::createNo();
167167
}

0 commit comments

Comments
 (0)