File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -20,4 +20,13 @@ interface Identifier
2020 * @return string
2121 */
2222 public function value (): string ;
23+
24+ /**
25+ * Check if the given identifier is the same than the current one.
26+ *
27+ * @param Identifier $other
28+ *
29+ * @return bool
30+ */
31+ public function is (Identifier $ other ): bool ;
2332}
Original file line number Diff line number Diff line change @@ -72,6 +72,18 @@ public static function random(): self
7272 return new static (self ::RANDOM );
7373 }
7474
75+ /**
76+ * Check if the given identifier is the same than the current one.
77+ *
78+ * @param Identifier $other
79+ *
80+ * @return bool
81+ */
82+ public function is (Identifier $ other ): bool
83+ {
84+ return $ this ->equals ($ other );
85+ }
86+
7587 /**
7688 * To string method.
7789 *
You can’t perform that action at this time.
0 commit comments