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

nette / utils / 22290136219

23 Feb 2026 01:47AM UTC coverage: 93.125% (-0.003%) from 93.128%
22290136219

push

github

dg
added CLAUDE.md

2086 of 2240 relevant lines covered (93.13%)

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 declare(strict_types=1);
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
namespace Nette\Utils;
9

10
use function explode, is_string, str_contains;
11

12

13
/**
14
 * ReflectionMethod preserving the original class name.
15
 * @internal
16
 */
17
final class ReflectionMethod extends \ReflectionMethod
18
{
19
        /** @var \ReflectionClass<object> */
20
        private readonly \ReflectionClass $originalClass;
21

22

23
        /** @param  class-string|object  $objectOrMethod */
24
        public function __construct(object|string $objectOrMethod, ?string $method = null)
1✔
25
        {
26
                if (is_string($objectOrMethod) && str_contains($objectOrMethod, '::')) {
1✔
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
        /** @return \ReflectionClass<object> */
35
        public function getOriginalClass(): \ReflectionClass
36
        {
37
                return $this->originalClass;
1✔
38
        }
39
}
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