• 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

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

13

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

25

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

31

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

37

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