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

nette / tracy / 3832360720

pending completion
3832360720

push

github

David Grudl
TracyExtension: sets $mailer only to Tracy\Logger [Closes #549]

1 of 1 new or added line in 1 file covered. (100.0%)

1761 of 2451 relevant lines covered (71.85%)

0.72 hits per line

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

18.92
/src/Tracy/BlueScreen/assets/section-http.phtml
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tracy;
6

7
/**
8
 * @var string $source
9
 * @var string[] $httpHeaders
10
 * @var callable $dump
11
 * @var bool $headersSent
12
 * @var ?string $headersFile
13
 * @var ?int $headersLine
14
 */
15

16
if (Helpers::isCli()) {
1✔
17
        return;
1✔
18
}
19
?>
20
<section class="tracy-section">
×
21
        <h2 class="tracy-section-label"><a href="#" data-tracy-ref="^+" class="tracy-toggle tracy-collapsed">HTTP</a></h2>
22

23
        <div class="tracy-section-panel tracy-collapsed">
24

25
        <div class="tracy-tabs">
26
                <ul class="tracy-tab-bar">
1✔
27
                        <li class="tracy-tab-label tracy-active"><a href="#">Request</a></li>
28
                        <li class="tracy-tab-label"><a href="#">Response</a></li>
29
                </ul>
1✔
30

1✔
31
                <div>
32

33
                        <div class="tracy-tab-panel tracy-active">
34
                        <h3><?= Helpers::escapeHtml($_SERVER['REQUEST_METHOD'] ?? 'URL') ?> <a href="<?= Helpers::escapeHtml($source) ?>" target="_blank" rel="noreferrer noopener" style="font-weight: normal"><?= Helpers::escapeHtml($source) ?></a></h3>
×
35

36
<?php if ($httpHeaders): ?>
×
37
                        <div class="tracy-pane">
1✔
38
                                <table class="tracy-sortable">
39
<?php        foreach ($httpHeaders as $k => $v): ?>
×
40
                                        <tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
×
41
<?php        endforeach ?>
42
                                </table>
×
43
                        </div>
44
<?php endif ?>
45

×
46

47
<?php foreach (['_GET', '_POST', '_COOKIE'] as $name): ?>
×
48
                        <h3>$<?= Helpers::escapeHtml($name) ?></h3>
×
49
<?php        if (empty($GLOBALS[$name])):?>
×
50
                        <p><i>empty</i></p>
×
51
<?php        else: ?>
52
                        <div class="tracy-pane">
1✔
53
                                <table class="tracy-sortable">
54
<?php        foreach ($GLOBALS[$name] as $k => $v): ?>
×
55
                                        <tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
×
56
<?php        endforeach ?>
57
                                </table>
×
58
                        </div>
59
<?php        endif ?>
60
<?php endforeach ?>
61
                        </div>
×
62

63

64
                        <div class="tracy-tab-panel">
65
                        <h3>Code: <?= Helpers::escapeHtml(http_response_code()) ?></h3>
×
66
<?php if (headers_list()): ?>
×
67
                        <div class="tracy-pane">
×
68
                                <table class="tracy-sortable">
69
<?php        foreach (headers_list() as $s): $s = explode(':', $s, 2); ?>
×
70
                                        <tr><th><?= Helpers::escapeHtml($s[0]) ?></th><td><?= $dump(trim($s[1]), $s[0]) ?></td></tr>
×
71
<?php        endforeach ?>
72
                                </table>
×
73
                        </div>
74
<?php else: ?>
75
                        <p><i>no headers</i></p>
×
76
<?php endif ?>
77

×
78

79
<?php if ($headersSent && $headersFile && @is_file($headersFile)): ?>
×
80
                        <p>Headers have been sent, output started at <?= Helpers::editorLink($headersFile, $headersLine) ?> <a href="#" data-tracy-ref="^p + div" class="tracy-toggle tracy-collapsed">source</a></p>
×
81
                        <div class="tracy-collapsed"><?= BlueScreen::highlightFile($headersFile, $headersLine) ?></div>
×
82
<?php elseif ($headersSent): ?>
×
83
                        <p>Headers have been sent</p>
×
84
<?php else: ?>
85
                        <p>Headers were not sent at the time the exception was thrown</p>
×
86
<?php endif ?>
87
                        </div>
×
88
                </div>
89
        </div>
90
        </div>
91
</section>
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

© 2025 Coveralls, Inc