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

phpolar / phpolar / 16086953532

05 Jul 2025 09:52AM UTC coverage: 95.833% (-4.2%) from 100.0%
16086953532

push

github

web-flow
feat: deprecate response builder (#451)

The ResponseBuilder and interface are superfluous.

Signed-off-by: Eric Fortmeyer <e.fortmeyer01@gmail.com>

9 of 10 new or added lines in 2 files covered. (90.0%)

8 existing lines in 2 files now uncovered.

207 of 216 relevant lines covered (95.83%)

5.35 hits per line

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

0.0
/src/Http/ResponseBuilder.php
1
<?php
2

3
namespace Phpolar\Phpolar\Http;
4

5
use Psr\Http\Message\ResponseFactoryInterface;
6
use Psr\Http\Message\ResponseInterface;
7
use Psr\Http\Message\StreamFactoryInterface;
8

9
/**
10
 * @deprecated
11
 */
12
final class ResponseBuilder implements ResponseBuilderInterface
13
{
14
    public function __construct(
15
        private ResponseFactoryInterface $responseFactory,
16
        private StreamFactoryInterface $streamFactory,
NEW
17
    ) {}
×
18

19
    public function build(string $content = ""): ResponseInterface
20
    {
UNCOV
21
        return $this->responseFactory
×
UNCOV
22
            ->createResponse()
×
UNCOV
23
            ->withBody(
×
UNCOV
24
                $this->streamFactory->createStream($content)
×
UNCOV
25
            );
×
26
    }
27
}
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