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

nepada / presenter-mapping / 6342715702

28 Sep 2023 06:12PM UTC coverage: 91.667%. Remained the same
6342715702

push

github

xificurk
Drop useless dev dependency

77 of 84 relevant lines covered (91.67%)

0.92 hits per line

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

90.0
/src/PresenterMapping/PresenterFactory.php
1
<?php
2
declare(strict_types = 1);
3

4
namespace Nepada\PresenterMapping;
5

6
use Nette;
7

8
class PresenterFactory extends Nette\Application\PresenterFactory
9
{
10

11
    private PresenterMapper $presenterMapper;
12

13
    public function __construct(PresenterMapper $presenterMapper, ?callable $factory = null)
1✔
14
    {
15
        parent::__construct($factory);
1✔
16
        $this->presenterMapper = $presenterMapper;
1✔
17
    }
1✔
18

19
    /**
20
     * Formats presenter class name from its name.
21
     */
22
    public function formatPresenterClass(string $presenter): string
1✔
23
    {
24
        return $this->presenterMapper->formatPresenterClass($presenter);
1✔
25
    }
26

27
    /**
28
     * Formats presenter name from class name.
29
     */
30
    public function unformatPresenterClass(string $class): ?string
31
    {
32
        return $this->presenterMapper->unformatPresenterClass($class);
×
33
    }
34

35
    /**
36
     * @deprecated BC with Nette PresenterFactory, use PresenterMapping::setMapping() instead.
37
     * @param string[]|string[][] $mapping
38
     * @return $this
39
     */
40
    public function setMapping(array $mapping): static
1✔
41
    {
42
        $this->presenterMapper->setMapping($mapping);
1✔
43
        return $this;
1✔
44
    }
45

46
}
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