composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
39
vendor/nikic/php-parser/test/code/formatPreservation/addingPropertyType.test
vendored
Normal file
39
vendor/nikic/php-parser/test/code/formatPreservation/addingPropertyType.test
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
Adding property type
|
||||
-----
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
|
||||
public $a
|
||||
= 1;
|
||||
}
|
||||
-----
|
||||
$stmts[0]->stmts[0]->type = new Node\Identifier('string');
|
||||
-----
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
|
||||
public string $a
|
||||
= 1;
|
||||
}
|
||||
-----
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
public
|
||||
$b;
|
||||
}
|
||||
-----
|
||||
$stmts[0]->stmts[0]->type = new Node\Identifier('int');
|
||||
-----
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
public
|
||||
int $b;
|
||||
}
|
|
@ -13,4 +13,16 @@ $new->args[] = new Expr\Variable('y');
|
|||
<?php
|
||||
new class
|
||||
($x, $y)
|
||||
{ };
|
||||
{ };
|
||||
-----
|
||||
<?php
|
||||
new class
|
||||
{};
|
||||
-----
|
||||
// Ignore name assigned to anon class
|
||||
$new = $stmts[0]->expr;
|
||||
$new->class->name = new Node\Identifier('Anon1');
|
||||
-----
|
||||
<?php
|
||||
new class
|
||||
{};
|
22
vendor/nikic/php-parser/test/code/formatPreservation/removingPropertyType.test
vendored
Normal file
22
vendor/nikic/php-parser/test/code/formatPreservation/removingPropertyType.test
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Removing property type
|
||||
-----
|
||||
<?php
|
||||
|
||||
class B
|
||||
{
|
||||
|
||||
public
|
||||
?float
|
||||
$b;
|
||||
}
|
||||
-----
|
||||
$stmts[0]->stmts[0]->type = null;
|
||||
-----
|
||||
<?php
|
||||
|
||||
class B
|
||||
{
|
||||
|
||||
public
|
||||
$b;
|
||||
}
|
Reference in a new issue