• 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

80.0
/src/Application/Responses/RedirectResponse.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
use Nette\Http;
14

15

16
/**
17
 * Redirects to new URI.
18
 */
19
final class RedirectResponse implements Nette\Application\Response
20
{
21
        public function __construct(
1✔
22
                private readonly string $url,
23
                private readonly int $httpCode = Http\IResponse::S302_Found,
24
        ) {
25
        }
1✔
26

27

28
        public function getUrl(): string
29
        {
30
                return $this->url;
1✔
31
        }
32

33

34
        public function getCode(): int
35
        {
36
                return $this->httpCode;
1✔
37
        }
38

39

40
        /**
41
         * Sends response to output.
42
         */
43
        public function send(Http\IRequest $httpRequest, Http\IResponse $httpResponse): void
44
        {
45
                $httpResponse->redirect($this->url, $this->httpCode);
×
46
        }
47
}
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