@@ -44,9 +44,9 @@ public function __construct(string $name)
44
44
* @param string $key
45
45
* @param bool|int|string $value
46
46
*
47
- * @return Element
47
+ * @return static
48
48
*/
49
- public function withAttribute (string $ key , $ value ): ElementInterface
49
+ public function withAttribute (string $ key , $ value ): static
50
50
{
51
51
$ this ->attributes [$ key ] = $ value ;
52
52
@@ -114,9 +114,9 @@ public function value()
114
114
/**
115
115
* @param string $value
116
116
*
117
- * @return Element
117
+ * @return static
118
118
*/
119
- public function withValue ($ value ): Element
119
+ public function withValue ($ value ): static
120
120
{
121
121
$ this ->withAttribute ('value ' , $ value );
122
122
@@ -134,9 +134,9 @@ public function attributes(): array
134
134
/**
135
135
* @param array $attributes
136
136
*
137
- * @return Element
137
+ * @return static
138
138
*/
139
- public function withAttributes (array $ attributes = []): Element
139
+ public function withAttributes (array $ attributes = []): static
140
140
{
141
141
$ this ->attributes = array_merge (
142
142
$ this ->attributes ,
@@ -157,9 +157,9 @@ public function options(): array
157
157
/**
158
158
* @param array $options
159
159
*
160
- * @return Element
160
+ * @return static
161
161
*/
162
- public function withOptions (array $ options = []): Element
162
+ public function withOptions (array $ options = []): static
163
163
{
164
164
$ this ->options = array_merge (
165
165
$ this ->options ,
@@ -173,9 +173,9 @@ public function withOptions(array $options = []): Element
173
173
* @param string $key
174
174
* @param int|string $value
175
175
*
176
- * @return Element
176
+ * @return static
177
177
*/
178
- public function withOption (string $ key , $ value ): Element
178
+ public function withOption (string $ key , $ value ): static
179
179
{
180
180
$ this ->options [$ key ] = $ value ;
181
181
@@ -199,9 +199,9 @@ public function option(string $key)
199
199
/**
200
200
* @param callable $callable
201
201
*
202
- * @return $this
202
+ * @return static
203
203
*/
204
- public function withFilter (callable $ callable ): Element
204
+ public function withFilter (callable $ callable ): static
205
205
{
206
206
$ this ->filter = $ callable ;
207
207
@@ -220,9 +220,9 @@ public function filter($value)
220
220
/**
221
221
* @param callable $callable
222
222
*
223
- * @return $this
223
+ * @return static
224
224
*/
225
- public function withValidator (callable $ callable ): Element
225
+ public function withValidator (callable $ callable ): static
226
226
{
227
227
$ this ->validator = $ callable ;
228
228
0 commit comments