Laravel version update
Laravel version update
This commit is contained in:
53
vendor/nikic/php-parser/test/code/prettyPrinter/commentsInCommaList.test
vendored
Normal file
53
vendor/nikic/php-parser/test/code/prettyPrinter/commentsInCommaList.test
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
Comments in arrays and function calls
|
||||
-----
|
||||
<?php
|
||||
|
||||
$arr = [
|
||||
// Foo
|
||||
$foo,
|
||||
// Bar
|
||||
$bar,
|
||||
// Discarded
|
||||
];
|
||||
[
|
||||
// Foo
|
||||
$foo,
|
||||
,
|
||||
// Bar
|
||||
$bar,
|
||||
] = $arr;
|
||||
foo(
|
||||
// Foo
|
||||
$foo,
|
||||
// Bar
|
||||
$bar
|
||||
);
|
||||
new Foo(
|
||||
// Foo
|
||||
$foo
|
||||
);
|
||||
-----
|
||||
!!php7
|
||||
$arr = [
|
||||
// Foo
|
||||
$foo,
|
||||
// Bar
|
||||
$bar,
|
||||
];
|
||||
[
|
||||
// Foo
|
||||
$foo,
|
||||
,
|
||||
// Bar
|
||||
$bar,
|
||||
] = $arr;
|
||||
foo(
|
||||
// Foo
|
||||
$foo,
|
||||
// Bar
|
||||
$bar
|
||||
);
|
||||
new Foo(
|
||||
// Foo
|
||||
$foo
|
||||
);
|
14
vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test
vendored
Normal file
14
vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
Array destructuring
|
||||
-----
|
||||
<?php
|
||||
|
||||
[$a, $b] = [$c, $d];
|
||||
[, $a, , , $b, ,] = $foo;
|
||||
[, [[$a]], $b] = $bar;
|
||||
['a' => $b, 'b' => $a] = $baz;
|
||||
-----
|
||||
!!php7
|
||||
[$a, $b] = [$c, $d];
|
||||
[, $a, , , $b, ] = $foo;
|
||||
[, [[$a]], $b] = $bar;
|
||||
['a' => $b, 'b' => $a] = $baz;
|
@@ -44,11 +44,13 @@ FALSE;
|
||||
'a';
|
||||
'a
|
||||
b';
|
||||
"a";
|
||||
"a\nb";
|
||||
'a\'b';
|
||||
'a\b';
|
||||
'a\\';
|
||||
|
||||
// strings (double quoted)
|
||||
"a";
|
||||
"a\nb";
|
||||
"a'b";
|
||||
"a\b";
|
||||
"$a";
|
||||
@@ -110,7 +112,7 @@ FALSE;
|
||||
0.0;
|
||||
1.0;
|
||||
1.0E+100;
|
||||
INF;
|
||||
\INF;
|
||||
1.0E-100;
|
||||
1.0E+84;
|
||||
378282246310005.0;
|
||||
@@ -119,10 +121,12 @@ INF;
|
||||
'a';
|
||||
'a
|
||||
b';
|
||||
'a\'b';
|
||||
'a\\b';
|
||||
'a\\';
|
||||
// strings (double quoted)
|
||||
"a";
|
||||
"a\nb";
|
||||
'a\'b';
|
||||
// strings (double quoted)
|
||||
"a'b";
|
||||
"a\\b";
|
||||
"{$a}";
|
||||
|
@@ -31,5 +31,5 @@ Number literals
|
||||
-42.5;
|
||||
1.0E+42;
|
||||
-1.0E+42;
|
||||
INF;
|
||||
-INF;
|
||||
\INF;
|
||||
-\INF;
|
@@ -38,6 +38,11 @@ yield from ($a and yield from $b);
|
||||
|
||||
print ($a and print $b);
|
||||
|
||||
-(-$a);
|
||||
+(+$a);
|
||||
-(--$a);
|
||||
+(++$a);
|
||||
|
||||
// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment
|
||||
// and incdec only work on variables.
|
||||
!$a = $b;
|
||||
@@ -70,6 +75,10 @@ $a ** $b ** $c;
|
||||
yield from $a and yield from $b;
|
||||
yield from ($a and yield from $b);
|
||||
print ($a and print $b);
|
||||
-(-$a);
|
||||
+(+$a);
|
||||
-(--$a);
|
||||
+(++$a);
|
||||
// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment
|
||||
// and incdec only work on variables.
|
||||
!($a = $b);
|
||||
|
@@ -49,4 +49,10 @@ HTML
|
||||
<?php
|
||||
echo 'PHP';
|
||||
?>
|
||||
HTML
|
||||
HTML
|
||||
-----
|
||||
HTML<?php echo 'PHP'; ?>HTML
|
||||
-----
|
||||
HTML<?php
|
||||
echo 'PHP';
|
||||
?>HTML
|
16
vendor/nikic/php-parser/test/code/prettyPrinter/nestedInlineHTML.test
vendored
Normal file
16
vendor/nikic/php-parser/test/code/prettyPrinter/nestedInlineHTML.test
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
InlineHTML node nested inside other code
|
||||
-----
|
||||
<?php
|
||||
|
||||
function test() {
|
||||
?>
|
||||
Test
|
||||
<?php
|
||||
}
|
||||
-----
|
||||
function test()
|
||||
{
|
||||
?>
|
||||
Test
|
||||
<?php
|
||||
}
|
@@ -8,4 +8,12 @@ World Hallo
|
||||
Hallo World
|
||||
Foo Bar
|
||||
Bar Foo
|
||||
World Hallo
|
||||
World Hallo
|
||||
-----
|
||||
|
||||
|
||||
Test
|
||||
-----
|
||||
|
||||
|
||||
Test
|
20
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test
vendored
Normal file
20
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Class constants
|
||||
-----
|
||||
<?php
|
||||
|
||||
class Foo
|
||||
{
|
||||
const A = 1, B = 2;
|
||||
public const C = 3, D = 4;
|
||||
protected const E = 5, F = 6;
|
||||
private const G = 7, H = 8;
|
||||
}
|
||||
-----
|
||||
!!php7
|
||||
class Foo
|
||||
{
|
||||
const A = 1, B = 2;
|
||||
public const C = 3, D = 4;
|
||||
protected const E = 5, F = 6;
|
||||
private const G = 7, H = 8;
|
||||
}
|
19
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test
vendored
Normal file
19
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Multi catch
|
||||
-----
|
||||
<?php
|
||||
try {
|
||||
$x;
|
||||
} catch (X|Y $e1) {
|
||||
$y;
|
||||
} catch (\A|B\C $e2) {
|
||||
$z;
|
||||
}
|
||||
-----
|
||||
!!php7
|
||||
try {
|
||||
$x;
|
||||
} catch (X|Y $e1) {
|
||||
$y;
|
||||
} catch (\A|B\C $e2) {
|
||||
$z;
|
||||
}
|
11
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test
vendored
Normal file
11
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Nullable types
|
||||
-----
|
||||
<?php
|
||||
function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz
|
||||
{
|
||||
}
|
||||
-----
|
||||
!!php7
|
||||
function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz
|
||||
{
|
||||
}
|
@@ -13,6 +13,7 @@ switch ($expr) {
|
||||
case 4:
|
||||
echo 'Third case, return instead of break';
|
||||
return;
|
||||
// Comment
|
||||
default:
|
||||
echo 'Default case';
|
||||
break;
|
||||
@@ -29,6 +30,7 @@ switch ($expr) {
|
||||
case 4:
|
||||
echo 'Third case, return instead of break';
|
||||
return;
|
||||
// Comment
|
||||
default:
|
||||
echo 'Default case';
|
||||
break;
|
||||
|
Reference in New Issue
Block a user