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

jsor / doctrine-postgis / 4647733370

pending completion
4647733370

push

github

Jan Sorgalla
Use Token::$type directly if available

118 of 118 new or added lines in 48 files covered. (100.0%)

1987 of 2002 relevant lines covered (99.25%)

19.22 hits per line

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

93.1
/src/Functions/ST_AsGML.php
1
<?php
2

3
declare(strict_types=1);
4

5
/* This file is auto-generated. Don't edit directly! */
6

7
namespace Jsor\Doctrine\PostGIS\Functions;
8

9
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
10
use Doctrine\ORM\Query\AST\Node;
11
use Doctrine\ORM\Query\Lexer;
12
use Doctrine\ORM\Query\Parser;
13
use Doctrine\ORM\Query\SqlWalker;
14

15
final class ST_AsGML extends FunctionNode
16
{
17
    protected array $expressions = [];
18

19
    public function parse(Parser $parser): void
20
    {
21
        $parser->match(Lexer::T_IDENTIFIER);
3✔
22
        $parser->match(Lexer::T_OPEN_PARENTHESIS);
3✔
23

24
        $this->expressions[] = $parser->ArithmeticFactor();
3✔
25

26
        $lexer = $parser->getLexer();
3✔
27

28
        /** @psalm-suppress DeprecatedMethod */
29
        $nextType = $lexer->lookahead['type'] ?? $lexer->lookahead->type ?? null;
3✔
30

31
        if (Lexer::T_COMMA === $nextType) {
3✔
32
            $parser->match(Lexer::T_COMMA);
1✔
33
            $this->expressions[] = $parser->ArithmeticFactor();
1✔
34
        }
35

36
        /** @psalm-suppress DeprecatedMethod */
37
        $nextType = $lexer->lookahead['type'] ?? $lexer->lookahead->type ?? null;
3✔
38

39
        if (Lexer::T_COMMA === $nextType) {
3✔
40
            $parser->match(Lexer::T_COMMA);
1✔
41
            $this->expressions[] = $parser->ArithmeticFactor();
1✔
42
        }
43

44
        /** @psalm-suppress DeprecatedMethod */
45
        $nextType = $lexer->lookahead['type'] ?? $lexer->lookahead->type ?? null;
3✔
46

47
        if (Lexer::T_COMMA === $nextType) {
3✔
48
            $parser->match(Lexer::T_COMMA);
1✔
49
            $this->expressions[] = $parser->ArithmeticFactor();
1✔
50
        }
51

52
        /** @psalm-suppress DeprecatedMethod */
53
        $nextType = $lexer->lookahead['type'] ?? $lexer->lookahead->type ?? null;
3✔
54

55
        if (Lexer::T_COMMA === $nextType) {
3✔
56
            $parser->match(Lexer::T_COMMA);
1✔
57
            $this->expressions[] = $parser->ArithmeticFactor();
1✔
58
        }
59

60
        /** @psalm-suppress DeprecatedMethod */
61
        $nextType = $lexer->lookahead['type'] ?? $lexer->lookahead->type ?? null;
3✔
62

63
        if (Lexer::T_COMMA === $nextType) {
3✔
64
            $parser->match(Lexer::T_COMMA);
×
65
            $this->expressions[] = $parser->ArithmeticFactor();
×
66
        }
67

68
        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
3✔
69
    }
70

71
    public function getSql(SqlWalker $sqlWalker): string
72
    {
73
        $arguments = [];
3✔
74

75
        /** @var Node $expression */
76
        foreach ($this->expressions as $expression) {
3✔
77
            $arguments[] = $expression->dispatch($sqlWalker);
3✔
78
        }
79

80
        return 'ST_AsGML(' . implode(', ', $arguments) . ')';
3✔
81
    }
82
}
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