# betterdocs/4.9.3/includes/Dependencies/PhpParser/Node/Stmt/Switch_.php

BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ &amp; Chatbot, version 4.9.3. 31 lines.

- Page: https://pluginprobe.com/plugins/betterdocs/4.9.3/code/includes/Dependencies/PhpParser/Node/Stmt/Switch_.php
- Raw: https://pluginprobe.com/plugins/betterdocs/4.9.3/raw/includes/Dependencies/PhpParser/Node/Stmt/Switch_.php
- Modified: 2023-08-14T08:41:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/betterdocs/4.9.3/code/includes/Dependencies/PhpParser/Node/Stmt/Switch_.php#L10-L20`.

```php
<?php

namespace WPDeveloper\BetterDocs\Dependencies\PhpParser\Node\Stmt;

use WPDeveloper\BetterDocs\Dependencies\PhpParser\Node;

class Switch_ extends Node\Stmt
{
    /** @var Node\Expr Condition */
    public $cond;
    /** @var Case_[] Case list */
    public $cases;

    /**
     * Constructs a case node.
     *
     * @param Node\Expr $cond       Condition
     * @param Case_[]   $cases      Case list
     * @param array     $attributes Additional attributes
     */
    public function __construct(Node\Expr $cond, array $cases, array $attributes = array()) {
        parent::__construct($attributes);
        $this->cond = $cond;
        $this->cases = $cases;
    }

    public function getSubNodeNames() {
        return array('cond', 'cases');
    }
}

```
