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

ClassAliasFuncCall::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 20
ccs 0
cts 20
cp 0
crap 2
rs 9.6
c 0
b 0
f 0
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