laravel horizon

This commit is contained in:
2019-05-14 04:39:55 +00:00
parent b20bde1f56
commit 34e42d3846
464 changed files with 57914 additions and 69 deletions

View 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';
}
}

View 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;
}

View 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;
}

View 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
)
)
)
)
)
)

View 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;
}