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

ICanBoogie / Render / 11922103768

19 Nov 2024 09:28PM UTC coverage: 92.35%. Remained the same
11922103768

push

github

olvlvl
Test against PHP 8.4

4 of 5 new or added lines in 3 files covered. (80.0%)

169 of 183 relevant lines covered (92.35%)

9.38 hits per line

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

0.0
/lib/InvalidRenderTarget.php
1
<?php
2

3
namespace ICanBoogie\Render;
4

5
use InvalidArgumentException;
6
use Throwable;
7

8
use function get_debug_type;
9

10
/**
11
 * Exception thrown when the target to render is invalid.
12
 */
13
class InvalidRenderTarget extends InvalidArgumentException implements Exception
14
{
15
    public function __construct(
16
        public readonly mixed $target,
17
        ?string $message = null,
18
        ?Throwable $previous = null
19
    ) {
NEW
20
        parent::__construct($message ?? $this->format_message($target), previous: $previous);
×
21
    }
22

23
    private function format_message(mixed $target): string
24
    {
25
        $type = get_debug_type($target);
×
26

27
        return "Invalid render target. Expected object or array, got: $type";
×
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

© 2025 Coveralls, Inc