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

zfegg / psr-mvc / 6174892731

13 Sep 2023 03:55PM UTC coverage: 96.477% (-0.1%) from 96.623%
6174892731

Pull #20

github

web-flow
Merge 79360d6b2 into 63d3fcb42
Pull Request #20: Remove factories, use `laminas/lamians-di` instead.

23 of 23 new or added lines in 5 files covered. (100.0%)

849 of 880 relevant lines covered (96.48%)

6.19 hits per line

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

75.0
/src/Container/CallbackHandlerAbstractFactory.php
1
<?php
2

3
declare(strict_types = 1);
4

5
namespace Zfegg\PsrMvc\Container;
6

7
use Interop\Container\ContainerInterface;
8
use Laminas\ServiceManager\Factory\AbstractFactoryInterface;
9
use Zfegg\PsrMvc\CallbackHandlerFactory;
10

11
class CallbackHandlerAbstractFactory implements AbstractFactoryInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16
    public function canCreate(ContainerInterface $container, $requestedName)
17
    {
18
        // For resolve cycle create.
19
        if ($requestedName === CallbackHandlerFactory::class) {
1✔
20
            return false;
×
21
        }
22
        return $container->get(CallbackHandlerFactory::class)->exists($requestedName);
1✔
23
    }
24

25
    /**
26
     * @inheritDoc
27
     */
28
    public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
29
    {
30
        return $container->get(CallbackHandlerFactory::class)->create($requestedName);
1✔
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

© 2025 Coveralls, Inc