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

nette / utils / 15764605036

19 Jun 2025 06:55PM UTC coverage: 92.467% (-0.05%) from 92.516%
15764605036

push

github

dg
Strings::trim() trims Line Separator and Ideographic Space (#326)

These characters occur in our data.

There are more characters listed at https://en.wikipedia.org/wiki/Whitespace_character#Unicode, maybe all of them should be included?

2050 of 2217 relevant lines covered (92.47%)

0.92 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✔
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

© 2026 Coveralls, Inc