We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27e84ed commit 3fd03edCopy full SHA for 3fd03ed
src/Component/Method/MethodImpl.php
@@ -11,19 +11,26 @@
11
*/
12
trait MethodImpl
13
{
14
+ /**
15
+ * @var non-empty-uppercase-string
16
+ */
17
+ public readonly string $name;
18
+
19
20
+ * @param non-empty-string $name
21
22
public function __construct(
- /**
- * @var non-empty-uppercase-string
- */
- public readonly string $name,
23
+ string $name,
24
public readonly ?bool $isIdempotent = null,
25
public readonly ?bool $isSafe = null,
- ) {}
26
+ ) {
27
+ $this->name = \strtoupper($name);
28
+ }
29
30
public function equals(mixed $other): bool
31
32
return $other === $this
- || ($other instanceof self
33
+ || ($other instanceof MethodInterface
34
&& $other->name === $this->name);
35
}
36
0 commit comments