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

nikic / PHP-Parser / 18631674169

19 Oct 2025 02:18PM UTC coverage: 92.375% (-0.2%) from 92.539%
18631674169

Pull #1113

github

web-flow
Merge 86a87b02d into 0105ba17b
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%)

19 existing lines in 1 file 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

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

3
namespace PhpParser\Node\Stmt;
4

5
use PhpParser\Node\ContainsStmts;
6
use PhpParser\Node\Stmt;
7

8
class Block extends Stmt implements ContainsStmts {
9
    /** @var Stmt[] Statements */
10
    public array $stmts;
11

12
    /**
13
     * A block of statements.
14
     *
15
     * @param Stmt[] $stmts Statements
16
     * @param array<string, mixed> $attributes Additional attributes
17
     */
18
    public function __construct(array $stmts, array $attributes = []) {
19
        $this->attributes = $attributes;
75✔
20
        $this->stmts = $stmts;
75✔
21
    }
22

23
    public function getType(): string {
24
        return 'Stmt_Block';
16✔
25
    }
26

27
    public function getSubNodeNames(): array {
28
        return ['stmts'];
17✔
29
    }
30

31
    /**
32
     * @return Stmt[]
33
     */
34
    public function getStmts(): array {
NEW
35
        return $this->stmts;
×
36
    }
37
}
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