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

brick / geo / 17456115941

04 Sep 2025 07:06AM UTC coverage: 50.432%. Remained the same
17456115941

push

github

BenMorel
Use @extends and @implements instead of @template-* variants

For consistency with the rest of the project.

1867 of 3702 relevant lines covered (50.43%)

1140.21 hits per line

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

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

3
declare(strict_types=1);
4

5
namespace Brick\Geo\Exception;
6

7
use Exception;
8

9
use function sprintf;
10

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

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

27
        return new self($message);
221✔
28
    }
29

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

35
    public static function unexpectedReturnType(
36
        string $expectedClassName,
37
        string $actualClassName,
38
    ): GeometryEngineException {
39
        return new self(sprintf(
×
40
            'The geometry engine returned an unexpected type: expected %s, got %s.',
×
41
            $expectedClassName,
×
42
            $actualClassName,
×
43
        ));
×
44
    }
45
}
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