laravel horizon
This commit is contained in:
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
vendored
Normal file
12
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
use PhpParser\Node\Expr\AssignOp;
|
||||
|
||||
class Coalesce extends AssignOp
|
||||
{
|
||||
public function getType() : string {
|
||||
return 'Expr_AssignOp_Coalesce';
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
70
vendor/nikic/php-parser/test/code/parser/stmt/class/propertyTypes.test
vendored
Normal file
70
vendor/nikic/php-parser/test/code/parser/stmt/class/propertyTypes.test
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
Class declaration
|
||||
-----
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public string $a;
|
||||
protected static D $b;
|
||||
private ?float $c;
|
||||
}
|
||||
-----
|
||||
!!php7
|
||||
array(
|
||||
0: Stmt_Class(
|
||||
flags: 0
|
||||
name: Identifier(
|
||||
name: A
|
||||
)
|
||||
extends: null
|
||||
implements: array(
|
||||
)
|
||||
stmts: array(
|
||||
0: Stmt_Property(
|
||||
flags: MODIFIER_PUBLIC (1)
|
||||
type: Identifier(
|
||||
name: string
|
||||
)
|
||||
props: array(
|
||||
0: Stmt_PropertyProperty(
|
||||
name: VarLikeIdentifier(
|
||||
name: a
|
||||
)
|
||||
default: null
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_Property(
|
||||
flags: MODIFIER_PROTECTED | MODIFIER_STATIC (10)
|
||||
type: Name(
|
||||
parts: array(
|
||||
0: D
|
||||
)
|
||||
)
|
||||
props: array(
|
||||
0: Stmt_PropertyProperty(
|
||||
name: VarLikeIdentifier(
|
||||
name: b
|
||||
)
|
||||
default: null
|
||||
)
|
||||
)
|
||||
)
|
||||
2: Stmt_Property(
|
||||
flags: MODIFIER_PRIVATE (4)
|
||||
type: NullableType(
|
||||
type: Identifier(
|
||||
name: float
|
||||
)
|
||||
)
|
||||
props: array(
|
||||
0: Stmt_PropertyProperty(
|
||||
name: VarLikeIdentifier(
|
||||
name: c
|
||||
)
|
||||
default: null
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
20
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/properties.test
vendored
Normal file
20
vendor/nikic/php-parser/test/code/prettyPrinter/stmt/properties.test
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Class properties
|
||||
-----
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
public $a;
|
||||
public string $b;
|
||||
protected static ?float $c = 5.0;
|
||||
private static ?self $d;
|
||||
}
|
||||
-----
|
||||
!!php7
|
||||
class A
|
||||
{
|
||||
public $a;
|
||||
public string $b;
|
||||
protected static ?float $c = 5.0;
|
||||
private static ?self $d;
|
||||
}
|
||||
Reference in New Issue
Block a user