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

jojo1981 / json-ast-builder / 17578687754

09 Sep 2025 09:48AM UTC coverage: 35.019%. Remained the same
17578687754

push

github

jojo1981
Fix: Make compatible with PHP versions: ^8.0|^8.1|^8.2|^8.3|^8.4. Closes #1
https://github.com/jojo1981/json-ast-builder/issues/1

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

290 existing lines in 25 files now uncovered.

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

28.57
/src/Ast/MemberNode.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\Ast;
13

14
use Jojo1981\JsonAstBuilder\Visitor\VisitorInterface;
15

16
/**
17
 * @package Jojo1981\JsonAstBuilder\Ast
18
 */
19
final class MemberNode implements NodeInterface
20
{
21
    /** @var KeyNode */
22
    private KeyNode $key;
23

24
    /** @var ElementNode */
25
    private ElementNode $value;
26

27
    public function __construct(KeyNode $key, ElementNode $element)
28
    {
29
        $this->key = $key;
5✔
30
        $this->value = $element;
5✔
31
    }
32

33
    /**
34
     * @return KeyNode
35
     */
36
    public function getKey(): KeyNode
37
    {
UNCOV
38
        return $this->key;
×
39
    }
40

41
    /**
42
     * @param KeyNode $key
43
     * @return void
44
     */
45
    public function setKey(KeyNode $key): void
46
    {
UNCOV
47
        $this->key = $key;
×
48
    }
49

50
    /**
51
     * @return ElementNode
52
     */
53
    public function getValue(): ElementNode
54
    {
UNCOV
55
        return $this->value;
×
56
    }
57

58
    /**
59
     * @param ElementNode $value
60
     * @return void
61
     */
62
    public function setValue(ElementNode $value): void
63
    {
UNCOV
64
        $this->value = $value;
×
65
    }
66

67
    /**
68
     * @param VisitorInterface $visitor
69
     * @return mixed
70
     */
71
    public function accept(VisitorInterface $visitor): mixed
72
    {
UNCOV
73
        return $visitor->visitMemberNode($this);
×
74
    }
75
}
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