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

eliashaeussler / cache-warmup / 18427815873

11 Oct 2025 09:49AM UTC coverage: 90.061%. Remained the same
18427815873

push

github

web-flow
[TASK] Update all dependencies (#551)

* [TASK] Update all dependencies

* [TASK] Overwrite `@throws` annotations in `NullStream`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Elias Häußler <elias@haeussler.dev>

1785 of 1982 relevant lines covered (90.06%)

10.18 hits per line

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

81.48
/src/Http/Message/Stream/NullStream.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the Composer package "eliashaeussler/cache-warmup".
7
 *
8
 * Copyright (C) 2020-2025 Elias Häußler <elias@haeussler.dev>
9
 *
10
 * This program is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation, either version 3 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22
 */
23

24
namespace EliasHaeussler\CacheWarmup\Http\Message\Stream;
25

26
use Psr\Http\Message;
27

28
use function strlen;
29

30
/**
31
 * NullStream.
32
 *
33
 * @author Elias Häußler <elias@haeussler.dev>
34
 * @license GPL-3.0-or-later
35
 */
36
final class NullStream implements Message\StreamInterface
37
{
38
    public function __toString(): string
1✔
39
    {
40
        return '';
1✔
41
    }
42

43
    public function close(): void {}
×
44

45
    public function detach()
1✔
46
    {
47
        return null;
1✔
48
    }
49

50
    public function getSize(): int
1✔
51
    {
52
        return 0;
1✔
53
    }
54

55
    /**
56
     * @throws void
57
     */
58
    public function tell(): int
×
59
    {
60
        return 0;
×
61
    }
62

63
    public function eof(): bool
1✔
64
    {
65
        return true;
1✔
66
    }
67

68
    public function isSeekable(): bool
1✔
69
    {
70
        return true;
1✔
71
    }
72

73
    /**
74
     * @throws void
75
     */
76
    public function seek(int $offset, int $whence = SEEK_SET): void {}
×
77

78
    /**
79
     * @throws void
80
     */
81
    public function rewind(): void {}
×
82

83
    public function isWritable(): bool
1✔
84
    {
85
        return true;
1✔
86
    }
87

88
    public function write(string $string): int
1✔
89
    {
90
        return strlen($string);
1✔
91
    }
92

93
    public function isReadable(): bool
1✔
94
    {
95
        return true;
1✔
96
    }
97

98
    /**
99
     * @throws void
100
     */
101
    public function read(int $length): string
1✔
102
    {
103
        return '';
1✔
104
    }
105

106
    /**
107
     * @throws void
108
     */
109
    public function getContents(): string
1✔
110
    {
111
        return '';
1✔
112
    }
113

114
    /**
115
     * @return array{}|null
116
     */
117
    public function getMetadata(?string $key = null): ?array
2✔
118
    {
119
        return null !== $key ? null : [];
2✔
120
    }
121
}
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