@@ -9,7 +9,6 @@  | 
                                                    ||
| 9 | 9 | protected $tag = 'fieldset';  | 
                                                        
| 10 | 10 | |
| 11 | 11 | /**  | 
                                                        
| 12 | - * @param \Spatie\Html\HtmlElement|string $text  | 
                                                        |
| 13 | 12 | *  | 
                                                        
| 14 | 13 | * @return static  | 
                                                        
| 15 | 14 | */  | 
                                                        
@@ -2,10 +2,10 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\Html\Elements;  | 
                                                        
| 4 | 4 | |
| 5 | +use Illuminate\Support\Collection;  | 
                                                        |
| 5 | 6 | use Illuminate\Support\Str;  | 
                                                        
| 6 | -use Spatie\Html\Selectable;  | 
                                                        |
| 7 | 7 | use Spatie\Html\BaseElement;  | 
                                                        
| 8 | -use Illuminate\Support\Collection;  | 
                                                        |
| 8 | +use Spatie\Html\Selectable;  | 
                                                        |
| 9 | 9 | |
| 10 | 10 | class Select extends BaseElement  | 
                                                        
| 11 | 11 |  { | 
                                                        
@@ -137,6 +137,9 @@  | 
                                                    ||
| 137 | 137 | $this->children = $this->applyValueToElements($value, $this->children);  | 
                                                        
| 138 | 138 | }  | 
                                                        
| 139 | 139 | |
| 140 | + /**  | 
                                                        |
| 141 | + * @param Collection $value  | 
                                                        |
| 142 | + */  | 
                                                        |
| 140 | 143 | protected function applyValueToElements($value, Collection $children)  | 
                                                        
| 141 | 144 |      { | 
                                                        
| 142 | 145 |          return $children->map(function ($child) use ($value) { | 
                                                        
@@ -49,7 +49,6 @@  | 
                                                    ||
| 49 | 49 | }  | 
                                                        
| 50 | 50 | |
| 51 | 51 | /**  | 
                                                        
| 52 | - * @param string|null $name  | 
                                                        |
| 53 | 52 | *  | 
                                                        
| 54 | 53 | * @return static  | 
                                                        
| 55 | 54 | */  | 
                                                        
@@ -12,8 +12,8 @@  | 
                                                    ||
| 12 | 12 | protected $tag = 'optgroup';  | 
                                                        
| 13 | 13 | |
| 14 | 14 | /**  | 
                                                        
| 15 | - * @param string|null $href  | 
                                                        |
| 16 | 15 | *  | 
                                                        
| 16 | + * @param string $label  | 
                                                        |
| 17 | 17 | * @return static  | 
                                                        
| 18 | 18 | */  | 
                                                        
| 19 | 19 | public function label($label)  | 
                                                        
@@ -3,13 +3,13 @@  | 
                                                    ||
| 3 | 3 | namespace Spatie\Html;  | 
                                                        
| 4 | 4 | |
| 5 | 5 | use BadMethodCallException;  | 
                                                        
| 6 | +use Illuminate\Contracts\Support\Htmlable;  | 
                                                        |
| 6 | 7 | use Illuminate\Support\Collection;  | 
                                                        
| 7 | 8 | use Illuminate\Support\HtmlString;  | 
                                                        
| 8 | -use Spatie\Html\Exceptions\MissingTag;  | 
                                                        |
| 9 | -use Spatie\Html\Exceptions\InvalidHtml;  | 
                                                        |
| 10 | 9 | use Illuminate\Support\Traits\Macroable;  | 
                                                        
| 11 | 10 | use Spatie\Html\Exceptions\InvalidChild;  | 
                                                        
| 12 | -use Illuminate\Contracts\Support\Htmlable;  | 
                                                        |
| 11 | +use Spatie\Html\Exceptions\InvalidHtml;  | 
                                                        |
| 12 | +use Spatie\Html\Exceptions\MissingTag;  | 
                                                        |
| 13 | 13 | |
| 14 | 14 | abstract class BaseElement implements Htmlable, HtmlElement  | 
                                                        
| 15 | 15 |  { | 
                                                        
@@ -192,7 +192,7 @@ discard block  | 
                                                    ||
| 192 | 192 | /**  | 
                                                        
| 193 | 193 | * Alias for `addChildren`.  | 
                                                        
| 194 | 194 | *  | 
                                                        
| 195 | - * @param \Spatie\Html\HtmlElement|string|iterable|null $children  | 
                                                        |
| 195 | + * @param Elements\Input $child  | 
                                                        |
| 196 | 196 | * @param callable|null $mapper  | 
                                                        
| 197 | 197 | *  | 
                                                        
| 198 | 198 | * @return static  | 
                                                        
@@ -205,7 +205,7 @@ discard block  | 
                                                    ||
| 205 | 205 | /**  | 
                                                        
| 206 | 206 | * Alias for `addChildren`.  | 
                                                        
| 207 | 207 | *  | 
                                                        
| 208 | - * @param \Spatie\Html\HtmlElement|string|iterable|null $children  | 
                                                        |
| 208 | + * @param \Spatie\Html\HtmlElement|string|iterable|null $child  | 
                                                        |
| 209 | 209 | * @param callable|null $mapper  | 
                                                        
| 210 | 210 | *  | 
                                                        
| 211 | 211 | * @return static  | 
                                                        
@@ -410,6 +410,10 @@ discard block  | 
                                                    ||
| 410 | 410 | return $this->__macro_call($name, $arguments);  | 
                                                        
| 411 | 411 | }  | 
                                                        
| 412 | 412 | |
| 413 | + /**  | 
                                                        |
| 414 | + * @param string $type  | 
                                                        |
| 415 | + * @param string $method  | 
                                                        |
| 416 | + */  | 
                                                        |
| 413 | 417 | protected function callConditionalMethod($type, $method, array $arguments)  | 
                                                        
| 414 | 418 |      { | 
                                                        
| 415 | 419 | $condition = (bool) array_shift($arguments);  | 
                                                        
@@ -445,6 +449,9 @@ discard block  | 
                                                    ||
| 445 | 449 | return $this->render();  | 
                                                        
| 446 | 450 | }  | 
                                                        
| 447 | 451 | |
| 452 | + /**  | 
                                                        |
| 453 | + * @param callable $mapper  | 
                                                        |
| 454 | + */  | 
                                                        |
| 448 | 455 | protected function parseChildren($children, $mapper = null): Collection  | 
                                                        
| 449 | 456 |      { | 
                                                        
| 450 | 457 |          if ($children instanceof HtmlElement) { | 
                                                        
@@ -41,7 +41,7 @@ discard block  | 
                                                    ||
| 41 | 41 | |
| 42 | 42 | /**  | 
                                                        
| 43 | 43 | * @param string|null $href  | 
                                                        
| 44 | - * @param string|null $text  | 
                                                        |
| 44 | + * @param string $contents  | 
                                                        |
| 45 | 45 | *  | 
                                                        
| 46 | 46 | * @return \Spatie\Html\Elements\A  | 
                                                        
| 47 | 47 | */  | 
                                                        
@@ -53,8 +53,6 @@ discard block  | 
                                                    ||
| 53 | 53 | }  | 
                                                        
| 54 | 54 | |
| 55 | 55 | /**  | 
                                                        
| 56 | - * @param string|null $href  | 
                                                        |
| 57 | - * @param string|null $text  | 
                                                        |
| 58 | 56 | *  | 
                                                        
| 59 | 57 | * @return \Spatie\Html\Elements\I  | 
                                                        
| 60 | 58 | */  | 
                                                        
@@ -66,7 +64,7 @@ discard block  | 
                                                    ||
| 66 | 64 | |
| 67 | 65 | /**  | 
                                                        
| 68 | 66 | * @param string|null $type  | 
                                                        
| 69 | - * @param string|null $text  | 
                                                        |
| 67 | + * @param string $contents  | 
                                                        |
| 70 | 68 | *  | 
                                                        
| 71 | 69 | * @return \Spatie\Html\Elements\Button  | 
                                                        
| 72 | 70 | */  | 
                                                        
@@ -314,7 +312,6 @@ discard block  | 
                                                    ||
| 314 | 312 | }  | 
                                                        
| 315 | 313 | |
| 316 | 314 | /**  | 
                                                        
| 317 | - * @param string|null $value  | 
                                                        |
| 318 | 315 | *  | 
                                                        
| 319 | 316 | * @return \Spatie\Html\Elements\Input  | 
                                                        
| 320 | 317 | */  | 
                                                        
@@ -516,7 +513,6 @@ discard block  | 
                                                    ||
| 516 | 513 | * a public alias for `old`.  | 
                                                        
| 517 | 514 | *  | 
                                                        
| 518 | 515 | * @param string $name  | 
                                                        
| 519 | - * @param mixed $value  | 
                                                        |
| 520 | 516 | *  | 
                                                        
| 521 | 517 | * @return mixed  | 
                                                        
| 522 | 518 | */  | 
                                                        
@@ -2,27 +2,27 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\Html;  | 
                                                        
| 4 | 4 | |
| 5 | -use Spatie\Html\Elements\A;  | 
                                                        |
| 6 | -use Spatie\Html\Elements\I;  | 
                                                        |
| 5 | +use Illuminate\Contracts\Support\Htmlable;  | 
                                                        |
| 7 | 6 | use Illuminate\Http\Request;  | 
                                                        
| 7 | +use Illuminate\Support\Collection;  | 
                                                        |
| 8 | +use Illuminate\Support\HtmlString;  | 
                                                        |
| 9 | +use Illuminate\Support\Traits\Macroable;  | 
                                                        |
| 10 | +use Spatie\Html\Elements\A;  | 
                                                        |
| 11 | +use Spatie\Html\Elements\Button;  | 
                                                        |
| 8 | 12 | use Spatie\Html\Elements\Div;  | 
                                                        
| 9 | -use Spatie\Html\Elements\Img;  | 
                                                        |
| 13 | +use Spatie\Html\Elements\Element;  | 
                                                        |
| 14 | +use Spatie\Html\Elements\Fieldset;  | 
                                                        |
| 10 | 15 | use Spatie\Html\Elements\File;  | 
                                                        
| 11 | 16 | use Spatie\Html\Elements\Form;  | 
                                                        
| 12 | -use Spatie\Html\Elements\Span;  | 
                                                        |
| 17 | +use Spatie\Html\Elements\I;  | 
                                                        |
| 18 | +use Spatie\Html\Elements\Img;  | 
                                                        |
| 13 | 19 | use Spatie\Html\Elements\Input;  | 
                                                        
| 14 | 20 | use Spatie\Html\Elements\Label;  | 
                                                        
| 15 | -use Spatie\Html\Elements\Button;  | 
                                                        |
| 16 | 21 | use Spatie\Html\Elements\Legend;  | 
                                                        
| 17 | 22 | use Spatie\Html\Elements\Option;  | 
                                                        
| 18 | 23 | use Spatie\Html\Elements\Select;  | 
                                                        
| 19 | -use Spatie\Html\Elements\Element;  | 
                                                        |
| 20 | -use Illuminate\Support\Collection;  | 
                                                        |
| 21 | -use Illuminate\Support\HtmlString;  | 
                                                        |
| 22 | -use Spatie\Html\Elements\Fieldset;  | 
                                                        |
| 24 | +use Spatie\Html\Elements\Span;  | 
                                                        |
| 23 | 25 | use Spatie\Html\Elements\Textarea;  | 
                                                        
| 24 | -use Illuminate\Support\Traits\Macroable;  | 
                                                        |
| 25 | -use Illuminate\Contracts\Support\Htmlable;  | 
                                                        |
| 26 | 26 | |
| 27 | 27 | class Html  | 
                                                        
| 28 | 28 |  { |