@@ -46,7 +46,7 @@ class Link implements EvolvableLinkInterface
4646 private $ rel = [];
4747
4848 /**
49- * @var string[]
49+ * @var array< string, string|\Stringable|int|float|bool|array>
5050 */
5151 private $ attributes = [];
5252
@@ -95,7 +95,7 @@ public function getAttributes(): array
9595 *
9696 * @return static
9797 */
98- public function withHref ($ href )
98+ public function withHref (string | \ Stringable $ href )
9999 {
100100 $ that = clone $ this ;
101101 $ that ->href = $ href ;
@@ -108,7 +108,7 @@ public function withHref($href)
108108 *
109109 * @return static
110110 */
111- public function withRel ($ rel )
111+ public function withRel (string $ rel )
112112 {
113113 $ that = clone $ this ;
114114 $ that ->rel [$ rel ] = $ rel ;
@@ -121,7 +121,7 @@ public function withRel($rel)
121121 *
122122 * @return static
123123 */
124- public function withoutRel ($ rel )
124+ public function withoutRel (string $ rel )
125125 {
126126 $ that = clone $ this ;
127127 unset($ that ->rel [$ rel ]);
@@ -134,7 +134,7 @@ public function withoutRel($rel)
134134 *
135135 * @return static
136136 */
137- public function withAttribute ($ attribute , $ value )
137+ public function withAttribute (string $ attribute , string | \ Stringable | int | float | bool | array $ value )
138138 {
139139 $ that = clone $ this ;
140140 $ that ->attributes [$ attribute ] = $ value ;
@@ -147,7 +147,7 @@ public function withAttribute($attribute, $value)
147147 *
148148 * @return static
149149 */
150- public function withoutAttribute ($ attribute )
150+ public function withoutAttribute (string $ attribute )
151151 {
152152 $ that = clone $ this ;
153153 unset($ that ->attributes [$ attribute ]);
0 commit comments