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

nikic / PHP-Parser / 18712471845

22 Oct 2025 09:57AM UTC coverage: 92.375% (-0.2%) from 92.54%
18712471845

Pull #1113

github

web-flow
Merge 2a2622abf into 3a454ca03
Pull Request #1113: add ContaintsStmts interface to mark stmt classes with nested stmts inside

2 of 17 new or added lines in 14 files covered. (11.76%)

16 existing lines in 14 files now uncovered.

7681 of 8315 relevant lines covered (92.38%)

226.1 hits per line

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

83.33
/lib/PhpParser/Node/Stmt/While_.php
1
<?php declare(strict_types=1);
2

3
namespace PhpParser\Node\Stmt;
4

5
use PhpParser\Node;
6

7
class While_ extends Node\Stmt implements Node\ContainsStmts {
8
    /** @var Node\Expr Condition */
9
    public Node\Expr $cond;
10
    /** @var Node\Stmt[] Statements */
11
    public array $stmts;
12

13
    /**
14
     * Constructs a while node.
15
     *
16
     * @param Node\Expr $cond Condition
17
     * @param Node\Stmt[] $stmts Statements
18
     * @param array<string, mixed> $attributes Additional attributes
19
     */
20
    public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) {
21
        $this->attributes = $attributes;
9✔
22
        $this->cond = $cond;
9✔
23
        $this->stmts = $stmts;
9✔
24
    }
25

26
    public function getSubNodeNames(): array {
27
        return ['cond', 'stmts'];
7✔
28
    }
29

30
    public function getType(): string {
31
        return 'Stmt_While';
9✔
32
    }
33

34
    /**
35
     * @return Node\Stmt[]
36
     */
37
    public function getStmts(): array {
NEW
UNCOV
38
        return $this->stmts;
×
39
    }
40
}
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