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

brick / geo / 14062314517

25 Mar 2025 02:32PM UTC coverage: 61.936% (+8.0%) from 53.902%
14062314517

push

github

BenMorel
Implement PgsqlDriver (pgsql extension)

0 of 52 new or added lines in 1 file covered. (0.0%)

222 existing lines in 4 files now uncovered.

1881 of 3037 relevant lines covered (61.94%)

1265.14 hits per line

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

57.14
/src/Exception/GeometryEngineException.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Brick\Geo\Exception;
6

7
use Brick\Geo\Geometry;
8

9
/**
10
 * Exception thrown by geometry engines.
11
 *
12
 * This exception is notably thrown when a specific method is not implemented by a geometry engine.
13
 */
14
final class GeometryEngineException extends GeometryException
15
{
16
    public static function wrap(\Exception $e) : GeometryEngineException
17
    {
18
        return new self('The engine returned an exception: ' . $e->getMessage(), $e);
262✔
19
    }
20

21
    public static function unimplementedMethod(string $methodName) : GeometryEngineException
22
    {
UNCOV
23
        $message = sprintf('%s() is currently not implemented.', $methodName);
221✔
24

UNCOV
25
        return new self($message);
221✔
26
    }
27

28
    public static function operationYieldedNoResult() : GeometryEngineException
29
    {
30
        return new self('This operation yielded no result on the target database.');
×
31
    }
32

33
    public static function unexpectedDatabaseReturnType(string $expectedType, mixed $actualValue) : GeometryEngineException
34
    {
35
        return new self(sprintf(
22✔
36
            'The database returned an unexpected type: expected %s, got %s.',
22✔
37
            $expectedType,
22✔
38
            get_debug_type($actualValue),
22✔
39
        ));
22✔
40
    }
41

42
    /**
43
     * @param class-string<Geometry> $expectedClassName
44
     * @param class-string<Geometry> $actualClassName
45
     */
46
    public static function unexpectedReturnType(
47
        string $expectedClassName,
48
        string $actualClassName,
49
    ) : GeometryEngineException {
50
        return new self(sprintf(
×
51
            'The geometry engine returned an unexpected type: expected %s, got %s.',
×
52
            $expectedClassName,
×
53
            $actualClassName,
×
54
        ));
×
55
    }
56
}
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