Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.116.62.169
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
nikic /
php-parser /
test /
PhpParser /
Delete
Unzip
Name
Size
Permission
Date
Action
Builder
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
ErrorHandler
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Internal
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Lexer
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Node
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
NodeVisitor
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Parser
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
BuilderFactoryTest.php
11.11
KB
-rw-r--r--
2018-10-10 09:00
CodeParsingTest.php
4
KB
-rw-r--r--
2018-10-10 09:00
CodeTestAbstract.php
1021
B
-rw-r--r--
2018-10-10 09:00
CodeTestParser.php
1.89
KB
-rw-r--r--
2018-10-10 09:00
CommentTest.php
1.76
KB
-rw-r--r--
2018-10-10 09:00
ConstExprEvaluatorTest.php
4.06
KB
-rw-r--r--
2018-10-10 09:00
ErrorTest.php
3.53
KB
-rw-r--r--
2018-10-10 09:00
JsonDecoderTest.php
1.28
KB
-rw-r--r--
2018-10-10 09:00
LexerTest.php
9.18
KB
-rw-r--r--
2018-10-10 09:00
NameContextTest.php
3.06
KB
-rw-r--r--
2018-10-10 09:00
NodeAbstractTest.php
9.84
KB
-rw-r--r--
2018-10-10 09:00
NodeDumperTest.php
2.41
KB
-rw-r--r--
2018-10-10 09:00
NodeFinderTest.php
2.32
KB
-rw-r--r--
2018-10-10 09:00
NodeTraverserTest.php
15.23
KB
-rw-r--r--
2018-10-10 09:00
ParserFactoryTest.php
1.06
KB
-rw-r--r--
2018-10-10 09:00
ParserTest.php
7.46
KB
-rw-r--r--
2018-10-10 09:00
PrettyPrinterTest.php
12.14
KB
-rw-r--r--
2018-10-10 09:00
Save
Rename
<?php declare(strict_types=1); namespace PhpParser; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Use_; use PHPUnit\Framework\TestCase; class NameContextTest extends TestCase { /** * @dataProvider provideTestGetPossibleNames */ public function testGetPossibleNames($type, $name, $expectedPossibleNames) { $nameContext = new NameContext(new ErrorHandler\Throwing()); $nameContext->startNamespace(new Name('NS')); $nameContext->addAlias(new Name('Foo'), 'Foo', Use_::TYPE_NORMAL); $nameContext->addAlias(new Name('Foo\Bar'), 'Alias', Use_::TYPE_NORMAL); $nameContext->addAlias(new Name('Foo\fn'), 'fn', Use_::TYPE_FUNCTION); $nameContext->addAlias(new Name('Foo\CN'), 'CN', Use_::TYPE_CONSTANT); $possibleNames = $nameContext->getPossibleNames($name, $type); $possibleNames = array_map(function (Name $name) { return $name->toCodeString(); }, $possibleNames); $this->assertSame($expectedPossibleNames, $possibleNames); // Here the last name is always the shortest one $expectedShortName = $expectedPossibleNames[count($expectedPossibleNames) - 1]; $this->assertSame( $expectedShortName, $nameContext->getShortName($name, $type)->toCodeString() ); } public function provideTestGetPossibleNames() { return [ [Use_::TYPE_NORMAL, 'Test', ['\Test']], [Use_::TYPE_NORMAL, 'Test\Namespaced', ['\Test\Namespaced']], [Use_::TYPE_NORMAL, 'NS\Test', ['\NS\Test', 'Test']], [Use_::TYPE_NORMAL, 'ns\Test', ['\ns\Test', 'Test']], [Use_::TYPE_NORMAL, 'NS\Foo\Bar', ['\NS\Foo\Bar']], [Use_::TYPE_NORMAL, 'ns\foo\Bar', ['\ns\foo\Bar']], [Use_::TYPE_NORMAL, 'Foo', ['\Foo', 'Foo']], [Use_::TYPE_NORMAL, 'Foo\Bar', ['\Foo\Bar', 'Foo\Bar', 'Alias']], [Use_::TYPE_NORMAL, 'Foo\Bar\Baz', ['\Foo\Bar\Baz', 'Foo\Bar\Baz', 'Alias\Baz']], [Use_::TYPE_NORMAL, 'Foo\fn\Bar', ['\Foo\fn\Bar', 'Foo\fn\Bar']], [Use_::TYPE_FUNCTION, 'Foo\fn\bar', ['\Foo\fn\bar', 'Foo\fn\bar']], [Use_::TYPE_FUNCTION, 'Foo\fn', ['\Foo\fn', 'Foo\fn', 'fn']], [Use_::TYPE_FUNCTION, 'Foo\FN', ['\Foo\FN', 'Foo\FN', 'fn']], [Use_::TYPE_CONSTANT, 'Foo\CN\BAR', ['\Foo\CN\BAR', 'Foo\CN\BAR']], [Use_::TYPE_CONSTANT, 'Foo\CN', ['\Foo\CN', 'Foo\CN', 'CN']], [Use_::TYPE_CONSTANT, 'foo\CN', ['\foo\CN', 'Foo\CN', 'CN']], [Use_::TYPE_CONSTANT, 'foo\cn', ['\foo\cn', 'Foo\cn']], // self/parent/static must not be fully qualified [Use_::TYPE_NORMAL, 'self', ['self']], [Use_::TYPE_NORMAL, 'parent', ['parent']], [Use_::TYPE_NORMAL, 'static', ['static']], // true/false/null do not need to be fully qualified, even in namespaces [Use_::TYPE_CONSTANT, 'true', ['\true', 'true']], [Use_::TYPE_CONSTANT, 'false', ['\false', 'false']], [Use_::TYPE_CONSTANT, 'null', ['\null', 'null']], ]; } }