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

conedevelopment / root / 17914324319

22 Sep 2025 11:49AM UTC coverage: 77.588% (-0.5%) from 78.055%
17914324319

push

github

iamgergo
copyable fields

10 of 38 new or added lines in 4 files covered. (26.32%)

3320 of 4279 relevant lines covered (77.59%)

35.45 hits per line

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

0.0
/src/Support/Copyable.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Cone\Root\Support;
6

7
use Illuminate\Contracts\Support\Htmlable;
8
use Illuminate\Contracts\Support\Renderable;
9
use Illuminate\Support\Facades\Blade;
10
use Stringable;
11

12
class Copyable implements Htmlable, Renderable, Stringable
13
{
14
    /**
15
     * Create a new copyable instance.
16
     */
NEW
17
    public function __construct(protected string $text, protected string $value)
×
18
    {
19
        //
NEW
20
    }
×
21

22
    /**
23
     * Make a new copyable instance.
24
     */
NEW
25
    public static function make(string $text, ?string $value = null): static
×
26
    {
NEW
27
        return new static($text, $value ?: $text);
×
28
    }
29

30
    /**
31
     * Get the evaluated contents of the object.
32
     */
NEW
33
    public function render(): string
×
34
    {
NEW
35
        return Blade::render(sprintf('<x-root::copyable text="%s" value="%s" />', $this->text, $this->value));
×
36
    }
37

38
    /**
39
     * Get content as a string of HTML.
40
     */
NEW
41
    public function toHtml(): string
×
42
    {
NEW
43
        return $this->render();
×
44
    }
45

46
    /**
47
     * Get the string representation of the object.
48
     */
NEW
49
    public function __toString(): string
×
50
    {
NEW
51
        return $this->toHtml();
×
52
    }
53
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc