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

nette / utils / 20431395313

22 Dec 2025 12:06PM UTC coverage: 93.164% (+71.8%) from 21.324%
20431395313

push

github

dg
Html::addText() accepts int|null for back compatibility [Closes #332][Closes #333]

1 of 1 new or added line in 1 file covered. (100.0%)

140 existing lines in 15 files now uncovered.

2058 of 2209 relevant lines covered (93.16%)

0.93 hits per line

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

85.71
/src/Utils/ReflectionMethod.php
1
<?php
2

3
/**
4
 * This file is part of the Nette Framework (https://nette.org)
5
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6
 */
7

8
declare(strict_types=1);
9

10
namespace Nette\Utils;
11

12
use function explode, is_string, str_contains;
13

14

15
/**
16
 * ReflectionMethod preserving the original class name.
17
 * @internal
18
 */
19
final class ReflectionMethod extends \ReflectionMethod
20
{
21
        private \ReflectionClass $originalClass;
22

23

24
        public function __construct(object|string $objectOrMethod, ?string $method = null)
1✔
25
        {
26
                if (is_string($objectOrMethod) && str_contains($objectOrMethod, '::')) {
1✔
UNCOV
27
                        [$objectOrMethod, $method] = explode('::', $objectOrMethod, 2);
×
28
                }
29
                parent::__construct($objectOrMethod, $method);
1✔
30
                $this->originalClass = new \ReflectionClass($objectOrMethod);
1✔
31
        }
1✔
32

33

34
        public function getOriginalClass(): \ReflectionClass
35
        {
36
                return $this->originalClass;
1✔
37
        }
38
}
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