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

jojo1981 / json-ast-builder / 17578743546

09 Sep 2025 09:50AM UTC coverage: 35.019%. First build
17578743546

push

github

web-flow
Merge pull request #2 from jojo1981/feature/upgrade-php-versions

Fix: Make compatible with PHP versions: ^8.0|^8.1|^8.2|^8.3|^8.4

161 of 407 new or added lines in 17 files covered. (39.56%)

374 of 1068 relevant lines covered (35.02%)

3.47 hits per line

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

0.0
/src/Exception/LogicalException.php
1
<?php
2
/*
3
 * This file is part of the jojo1981/json-ast-builder package
4
 *
5
 * Copyright (c) 2019 Joost Nijhuis <jnijhuis81@gmail.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed in the root of the source code
9
 */
10
declare(strict_types=1);
11

12
namespace Jojo1981\JsonAstBuilder\Exception;
13

14
/**
15
 * @package Jojo1981\JsonAstBuilder\Exception
16
 */
17
final class LogicalException extends JsonException
18
{
19
    /**
20
     * @return LogicalException
21
     */
22
    public static function noInputGiven(): LogicalException
23
    {
NEW
24
        return new self(
×
25
            'Can not parse json string because no input is given. Set input first by calling the `setInput` method'
×
26
        );
×
27
    }
28

29
    /**
30
     * @return LogicalException
31
     */
32
    public static function alreadyAtTheEndOfFile(): LogicalException
33
    {
NEW
34
        return new self(<<<EOT
×
35
The Lexer is already at the end of the input stream and an EOF token has already been retrieved by an earlier invocation the: `getNext method.
36
You'll need to reset the Lexer first calling the `reset` method or set a new input by calling the `setInput` method.
37
When still parsing the token stream some logic in your parser needs to be fixed and do not call the `getNext` method when a EOF token already has been returned
38
EOT
×
39
        );
×
40
    }
41
}
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