Completed
Push — master ( 550011...0647fd )
by Théo
16:20 queued 07:57
created

ClassAliasFuncCall   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 0
cts 20
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the humbug/php-scoper package.
7
 *
8
 * Copyright (c) 2017 Théo FIDRY <[email protected]>,
9
 *                    Pádraic Brady <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Humbug\PhpScoper\PhpParser\Node;
16
17
use PhpParser\Node\Arg;
18
use PhpParser\Node\Expr\ConstFetch;
19
use PhpParser\Node\Expr\FuncCall;
20
use PhpParser\Node\Name\FullyQualified;
21
use PhpParser\Node\Scalar\String_;
22
23
final class ClassAliasFuncCall extends FuncCall
24
{
25
    /**
26
     * @inheritdoc
27
     */
28
    public function __construct(FullyQualified $prefixedName, FullyQualified $originalName, array $attributes = [])
29
    {
30
        parent::__construct(
31
            new FullyQualified('class_alias'),
32
            [
33
                new Arg(
34
                    new String_((string) $prefixedName)
35
                ),
36
                new Arg(
37
                    new String_((string) $originalName)
38
                ),
39
                new Arg(
40
                    new ConstFetch(
41
                        new FullyQualified('false')
42
                    )
43
                ),
44
            ],
45
            $attributes
46
        );
47
    }
48
}
49