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

contributte / datagrid / 8230157862

11 Mar 2024 09:02AM UTC coverage: 34.102%. First build
8230157862

Pull #1060

github

radimvaculik
Fix failing tests
Pull Request #1060: [7.x] Next

117 of 435 new or added lines in 54 files covered. (26.9%)

1124 of 3296 relevant lines covered (34.1%)

0.34 hits per line

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

0.0
/src/Utils/NetteDatabaseSelectionHelper.php
1
<?php declare(strict_types = 1);
2

3
namespace Contributte\Datagrid\Utils;
4

5
use Nette\Database\Driver;
6
use Nette\Database\Explorer;
7
use Nette\Database\Table\Selection;
8
use ReflectionClass;
9

10
final class NetteDatabaseSelectionHelper
11
{
12

13
        public static function getDriver(Selection $selection): Driver
14
        {
15
                $connection = self::getContext($selection)->getConnection();
×
16

NEW
17
                return $connection->getDriver();
×
18
        }
19

20
        public static function getContext(Selection $selection): Explorer
21
        {
22
                $reflection = new ReflectionClass($selection);
×
23

NEW
24
                $explorerProperty = $reflection->getProperty('explorer');
×
NEW
25
                $explorerProperty->setAccessible(true);
×
26

NEW
27
                return $explorerProperty->getValue($selection);
×
28
        }
29

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