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

mimmi20 / laminasviewrenderer-bootstrap-form / 12160906017

04 Dec 2024 01:37PM UTC coverage: 97.314%. Remained the same
12160906017

push

github

web-flow
Merge pull request #310 from mimmi20/updates

upgrade to PHP 8.3

60 of 61 new or added lines in 40 files covered. (98.36%)

38 existing lines in 7 files now uncovered.

2174 of 2234 relevant lines covered (97.31%)

25.52 hits per line

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

87.5
/src/HiddenHelperTrait.php
1
<?php
2

3
/**
4
 * This file is part of the mimmi20/laminasviewrenderer-bootstrap-form package.
5
 *
6
 * Copyright (c) 2021-2024, Thomas Mueller <mimmi20@live.de>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types = 1);
13

14
namespace Mimmi20\LaminasView\BootstrapForm;
15

16
use Laminas\View\Renderer\RendererInterface;
17

18
use function method_exists;
19

20
trait HiddenHelperTrait
21
{
22
    /**
23
     * Form label helper instance
24
     */
25
    private FormHiddenInterface | null $hiddenHelper = null;
26

27
    /**
28
     * Retrieve the FormLabel helper
29
     *
30
     * @throws void
31
     */
32
    private function getHiddenHelper(): FormHiddenInterface
31✔
33
    {
34
        if ($this->hiddenHelper) {
31✔
35
            return $this->hiddenHelper;
24✔
36
        }
37

38
        if ($this->view instanceof RendererInterface && method_exists($this->view, 'plugin')) {
31✔
39
            $this->hiddenHelper = $this->view->plugin('form_hidden');
31✔
40
        }
41

42
        if (!$this->hiddenHelper instanceof FormHiddenInterface) {
31✔
UNCOV
43
            $this->hiddenHelper = new FormHidden();
×
44
        }
45

46
        return $this->hiddenHelper;
31✔
47
    }
48
}
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