Code Duplication    Length = 28-28 lines in 2 locations

lib/PhpParser/Node/Stmt/Catch_.php 1 location

@@ 7-34 (lines=28) @@
4
5
use PhpParser\Node;
6
7
class Catch_ extends Node\Stmt
8
{
9
    /** @var Node\Name Class of exception */
10
    public $type;
11
    /** @var string Variable for exception */
12
    public $var;
13
    /** @var Node[] Statements */
14
    public $stmts;
15
16
    /**
17
     * Constructs a catch node.
18
     *
19
     * @param Node\Name $type       Class of exception
20
     * @param string    $var        Variable for exception
21
     * @param Node[]    $stmts      Statements
22
     * @param array     $attributes Additional attributes
23
     */
24
    public function __construct(Node\Name $type, $var, array $stmts = array(), array $attributes = array()) {
25
        parent::__construct($attributes);
26
        $this->type = $type;
27
        $this->var = $var;
28
        $this->stmts = $stmts;
29
    }
30
31
    public function getSubNodeNames() {
32
        return array('type', 'var', 'stmts');
33
    }
34
}
35

lib/PhpParser/Node/Stmt/GroupUse.php 1 location

@@ 8-35 (lines=28) @@
5
use PhpParser\Node\Stmt;
6
use PhpParser\Node\Name;
7
8
class GroupUse extends Stmt
9
{
10
    /** @var int Type of group use */
11
    public $type;
12
    /** @var Name Prefix for uses */
13
    public $prefix;
14
    /** @var UseUse[] Uses */
15
    public $uses;
16
17
    /**
18
     * Constructs a group use node.
19
     *
20
     * @param Name     $prefix     Prefix for uses
21
     * @param UseUse[] $uses       Uses
22
     * @param int      $type       Type of group use
23
     * @param array    $attributes Additional attributes
24
     */
25
    public function __construct(Name $prefix, array $uses, $type = Use_::TYPE_NORMAL, array $attributes = array()) {
26
        parent::__construct($attributes);
27
        $this->type = $type;
28
        $this->prefix = $prefix;
29
        $this->uses = $uses;
30
    }
31
32
    public function getSubNodeNames() {
33
        return array('type', 'prefix', 'uses');
34
    }
35
}
36