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

nette / application / 27919019709

21 Jun 2026 10:08PM UTC coverage: 84.111% (+0.05%) from 84.059%
27919019709

push

github

dg
phpstan fix

2038 of 2423 relevant lines covered (84.11%)

0.84 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 declare(strict_types=1);
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
namespace Nette\Application\Responses;
9

10
use Nette;
11

12

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

23

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

29

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

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