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

nette / application / 20834855301

08 Jan 2026 10:54PM UTC coverage: 84.605% (+1.7%) from 82.856%
20834855301

push

github

dg
added CLAUDE.md

1940 of 2293 relevant lines covered (84.61%)

0.85 hits per line

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

87.5
/src/Application/Responses/TextResponse.php
1
<?php
2

3
/**
4
 * This file is part of the Nette Framework (https://nette.org)
5
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6
 */
7

8
declare(strict_types=1);
9

10
namespace Nette\Application\Responses;
11

12
use Nette;
13

14

15
/**
16
 * String output response.
17
 */
18
final class TextResponse implements Nette\Application\Response
19
{
20
        public function __construct(
1✔
21
                private readonly mixed $source,
22
        ) {
23
        }
1✔
24

25

26
        public function getSource(): mixed
27
        {
28
                return $this->source;
×
29
        }
30

31

32
        /**
33
         * Sends response to output.
34
         */
35
        public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse): void
1✔
36
        {
37
                if ($this->source instanceof Nette\Application\UI\Template) {
1✔
38
                        $this->source->render();
1✔
39

40
                } else {
41
                        echo $this->source;
1✔
42
                }
43
        }
1✔
44
}
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