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

nette / application / 20561245963

28 Dec 2025 11:47PM UTC coverage: 82.276% (-0.2%) from 82.434%
20561245963

push

github

dg
composer: calls Tester with the -C parameter

A pragmatic decision - I do not know how to set extension_dir in a cross-platform way

1959 of 2381 relevant lines covered (82.28%)

0.82 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