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

IlyasDeckers / ody-core / 13532154862

25 Feb 2025 10:24PM UTC coverage: 30.374% (+1.7%) from 28.706%
13532154862

push

github

web-flow
Update php.yml

544 of 1791 relevant lines covered (30.37%)

9.13 hits per line

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

0.0
/src/Factory/Psr17/SlimHttpPsr17Factory.php
1
<?php
2
declare(strict_types=1);
3

4
namespace Ody\Core\Factory\Psr17;
5

6
use Psr\Http\Message\ResponseFactoryInterface;
7
use Psr\Http\Message\StreamFactoryInterface;
8
use RuntimeException;
9

10
class SlimHttpPsr17Factory extends Psr17Factory
11
{
12
    protected static string $responseFactoryClass = 'Ody\Core\Http\Factory\DecoratedResponseFactory';
13

14
    /**
15
     * @throws RuntimeException when the factory could not be instantiated
16
     */
17
    public static function createDecoratedResponseFactory(
×
18
        ResponseFactoryInterface $responseFactory,
19
        StreamFactoryInterface $streamFactory
20
    ): ResponseFactoryInterface {
21
        if (
22
            !((
×
23
                $decoratedResponseFactory = new static::$responseFactoryClass($responseFactory, $streamFactory)
×
24
                ) instanceof ResponseFactoryInterface
25
            )
26
        ) {
27
            throw new RuntimeException(get_called_class() . ' could not instantiate a decorated response factory.');
×
28
        }
29

30
        return $decoratedResponseFactory;
×
31
    }
32
}
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