• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tempestphp / tempest-framework / 12021710761

25 Nov 2024 06:54PM UTC coverage: 79.441% (-2.6%) from 81.993%
12021710761

push

github

web-flow
ci: close stale issues and pull requests

7879 of 9918 relevant lines covered (79.44%)

61.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/Tempest/View/src/Components/Form.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\View\Components;
6

7
use Tempest\View\Elements\ViewComponentElement;
8
use Tempest\View\ViewComponent;
9

10
final readonly class Form implements ViewComponent
11
{
12
    public static function getName(): string
×
13
    {
14
        return 'x-form';
×
15
    }
16

17
    public function compile(ViewComponentElement $element): string
1✔
18
    {
19
        $action = $element->getAttribute('action');
1✔
20
        $method = $element->getAttribute('method') ?? 'post';
1✔
21
        $enctype = $element->hasAttribute('enctype') ? sprintf('enctype="%s"', $element->getAttribute('enctype')) : '';
1✔
22

23
        return <<<HTML
1✔
24
<form action="{$action}" method="{$method}" {$enctype}>
1✔
25
    <x-slot />
26
</form>
27
HTML;
1✔
28
    }
29
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc