@ant-yasa/uast-parser-php 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +26 -0
- package/src/parser.ts +1234 -0
- package/tests/benchmark/base/advanced.php +20 -0
- package/tests/benchmark/base/advanced.php.json +1269 -0
- package/tests/benchmark/base/basic.php +3 -0
- package/tests/benchmark/base/basic.php.json +292 -0
- package/tests/benchmark/base/closure-class.php +24 -0
- package/tests/benchmark/base/closure-class.php.json +1623 -0
- package/tests/benchmark/base/control-flow.php +37 -0
- package/tests/benchmark/base/control-flow.php.json +2010 -0
- package/tests/benchmark/base/enum-trait-adapt.php +31 -0
- package/tests/benchmark/base/enum-trait-adapt.php.json +965 -0
- package/tests/benchmark/base/exprs.php +4 -0
- package/tests/benchmark/base/exprs.php.json +811 -0
- package/tests/benchmark/base/flow-extras.php +12 -0
- package/tests/benchmark/base/flow-extras.php.json +897 -0
- package/tests/benchmark/base/function.php +7 -0
- package/tests/benchmark/base/function.php.json +536 -0
- package/tests/benchmark/base/modern-php.php +13 -0
- package/tests/benchmark/base/modern-php.php.json +508 -0
- package/tests/benchmark/base/namespace.php +5 -0
- package/tests/benchmark/base/namespace.php.json +307 -0
- package/tests/benchmark/base/new-static.php +3 -0
- package/tests/benchmark/base/new-static.php.json +399 -0
- package/tests/benchmark/base/runtime.php +13 -0
- package/tests/benchmark/base/runtime.php.json +1095 -0
- package/tests/benchmark/base/strings-casts.php +17 -0
- package/tests/benchmark/base/strings-casts.php.json +1357 -0
- package/tests/benchmark/base/structures.php +26 -0
- package/tests/benchmark/base/structures.php.json +1582 -0
- package/tests/index.ts +87 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
trait LoggerA
|
|
4
|
+
{
|
|
5
|
+
public function log()
|
|
6
|
+
{
|
|
7
|
+
echo "A";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
trait LoggerB
|
|
12
|
+
{
|
|
13
|
+
public function log()
|
|
14
|
+
{
|
|
15
|
+
echo "B";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class Service
|
|
20
|
+
{
|
|
21
|
+
use LoggerA, LoggerB {
|
|
22
|
+
LoggerA::log insteadof LoggerB;
|
|
23
|
+
LoggerB::log as private logFromB;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
enum Status: string
|
|
28
|
+
{
|
|
29
|
+
case Open = 'open';
|
|
30
|
+
case Closed = 'closed';
|
|
31
|
+
}
|