Code Clean up, more testing
Remove unused code and classes. Clean up code to remove all named constant from them and throw deprecation alerts if used. Add basic psalm setup in root folder and remove from www folder
This commit is contained in:
@@ -8,10 +8,11 @@ namespace Microsoft\PhpParser\Node\Expression;
|
||||
|
||||
use Microsoft\PhpParser\Node\DelimitedList;
|
||||
use Microsoft\PhpParser\Node\Expression;
|
||||
use Microsoft\PhpParser\Node\QualifiedName;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class CallExpression extends Expression {
|
||||
/** @var Expression */
|
||||
/** @var QualifiedName|Expression */
|
||||
public $callableExpression;
|
||||
|
||||
/** @var Token */
|
||||
|
||||
@@ -14,7 +14,7 @@ class YieldExpression extends Expression {
|
||||
/** @var Token */
|
||||
public $yieldOrYieldFromKeyword;
|
||||
|
||||
/** @var ArrayElement */
|
||||
/** @var ArrayElement|null */
|
||||
public $arrayElement;
|
||||
|
||||
const CHILD_NAMES = ['yieldOrYieldFromKeyword', 'arrayElement'];
|
||||
|
||||
29
vendor/microsoft/tolerant-php-parser/src/Node/ParenthesizedIntersectionType.php
vendored
Normal file
29
vendor/microsoft/tolerant-php-parser/src/Node/ParenthesizedIntersectionType.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
namespace Microsoft\PhpParser\Node;
|
||||
|
||||
use Microsoft\PhpParser\MissingToken;
|
||||
use Microsoft\PhpParser\Node;
|
||||
use Microsoft\PhpParser\Node\DelimitedList\QualifiedNameList;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class ParenthesizedIntersectionType extends Node{
|
||||
/** @var Token */
|
||||
public $openParen;
|
||||
|
||||
/** @var QualifiedNameList|MissingToken */
|
||||
public $children;
|
||||
|
||||
/** @var Token */
|
||||
public $closeParen;
|
||||
|
||||
const CHILD_NAMES = [
|
||||
'openParen',
|
||||
'children',
|
||||
'closeParen'
|
||||
];
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class SourceFileNode extends Node {
|
||||
/** @var string */
|
||||
public $fileContents;
|
||||
|
||||
/** @var string */
|
||||
/** @var ?string */
|
||||
public $uri;
|
||||
|
||||
/** @var Node[] */
|
||||
|
||||
@@ -22,9 +22,12 @@ class ClassDeclaration extends StatementNode implements NamespacedNameInterface,
|
||||
/** @var AttributeGroup[]|null */
|
||||
public $attributes;
|
||||
|
||||
/** @var Token */
|
||||
/** @var Token abstract/final/readonly modifier */
|
||||
public $abstractOrFinalModifier;
|
||||
|
||||
/** @var Token[] additional abstract/final/readonly modifiers */
|
||||
public $modifiers;
|
||||
|
||||
/** @var Token */
|
||||
public $classKeyword;
|
||||
|
||||
@@ -43,6 +46,7 @@ class ClassDeclaration extends StatementNode implements NamespacedNameInterface,
|
||||
const CHILD_NAMES = [
|
||||
'attributes',
|
||||
'abstractOrFinalModifier',
|
||||
'modifiers',
|
||||
'classKeyword',
|
||||
'name',
|
||||
'classBaseClause',
|
||||
|
||||
45
vendor/microsoft/tolerant-php-parser/src/Node/Statement/HaltCompilerStatement.php
vendored
Normal file
45
vendor/microsoft/tolerant-php-parser/src/Node/Statement/HaltCompilerStatement.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
namespace Microsoft\PhpParser\Node\Statement;
|
||||
|
||||
use Microsoft\PhpParser\Node\Expression;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
class HaltCompilerStatement extends Expression {
|
||||
|
||||
/** @var Token */
|
||||
public $haltCompilerKeyword;
|
||||
|
||||
/** @var Token */
|
||||
public $openParen;
|
||||
|
||||
/** @var Token */
|
||||
public $closeParen;
|
||||
|
||||
/** @var Token (there is an implicit ')' before php close tags (`?>`)) */
|
||||
public $semicolonOrCloseTag;
|
||||
|
||||
/** @var Token|null TokenKind::InlineHtml data unless there are no bytes (This is optional if there is nothing after the semicolon) */
|
||||
public $data;
|
||||
|
||||
const CHILD_NAMES = [
|
||||
'haltCompilerKeyword',
|
||||
'openParen',
|
||||
'closeParen',
|
||||
'semicolonOrCloseTag',
|
||||
'data',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHaltCompilerOffset() {
|
||||
// This accounts for the fact that PHP close tags may include a single newline,
|
||||
// and that $this->data may be null.
|
||||
return $this->semicolonOrCloseTag->getEndPosition();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user