Skip to content

Commit 09db5a3

Browse files
committed
refactor: rename all files and directories from camelCase to kebab-case
Rename 138 files and 8 directories to follow kebab-case naming convention, and update all import paths accordingly. All 831 tests passing.
1 parent 8e1fae0 commit 09db5a3

154 files changed

Lines changed: 393 additions & 393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import { NamespaceBuilder } from './builder/namespace_';
88
import { ParamBuilder } from './builder/param';
99
import { PropertyBuilder } from './builder/property';
1010
import { UseBuilder } from './builder/use_';
11-
import { EnumCaseBuilder } from './builder/enumCase';
12-
import { ClassConstBuilder } from './builder/classConst';
11+
import { EnumCaseBuilder } from './builder/enum-case';
12+
import { ClassConstBuilder } from './builder/class-const';
1313
import { Node } from './node';
1414
import { Name } from './node/name';
1515
import { Int_ } from './node/scalar/int';
1616
import { Float_ } from './node/scalar/float';
1717
import { String_ } from './node/scalar/string';
18-
import { ConstFetch } from './node/expr/constFetch';
18+
import { ConstFetch } from './node/expr/const-fetch';
1919
import { Array_ } from './node/expr/array';
20-
import { ArrayItem } from './node/arrayItem';
20+
import { ArrayItem } from './node/array-item';
2121

2222
export class BuilderFactory {
2323
namespace_(name: string | Name | null): NamespaceBuilder {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ClassConst } from '../node/stmt/classConst';
1+
import { ClassConst } from '../node/stmt/class-const';
22
import { Const_ } from '../node/const';
33
import { Modifiers } from '../modifiers';
44
import { Node } from '../node';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EnumCase } from '../node/stmt/enumCase';
1+
import { EnumCase } from '../node/stmt/enum-case';
22
import { Node } from '../node';
33

44
export class EnumCaseBuilder {

src/builder/method.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ClassMethod } from '../node/stmt/classMethod';
1+
import { ClassMethod } from '../node/stmt/class-method';
22
import { Modifiers } from '../modifiers';
33
import { Node } from '../node';
44
import { normalizeType } from './param';

src/builder/property.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Property } from '../node/stmt/property';
2-
import { PropertyItem } from '../node/propertyItem';
2+
import { PropertyItem } from '../node/property-item';
33
import { Modifiers } from '../modifiers';
44
import { Node } from '../node';
55
import { normalizeType } from './param';

src/builder/use_.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Use_ } from '../node/stmt/use';
2-
import { UseItem } from '../node/useItem';
2+
import { UseItem } from '../node/use-item';
33
import { Name } from '../node/name';
44
import { Identifier } from '../node/identifier';
55

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
import { Expr } from './node/expr';
2-
import { ConstExprEvaluationException } from './constExprEvaluationException';
2+
import { ConstExprEvaluationException } from './const-expr-evaluation-exception';
33

44
// Scalar types
55
import { Int_ } from './node/scalar/int';
66
import { Float_ } from './node/scalar/float';
77
import { String_ } from './node/scalar/string';
88

99
// Unary operators
10-
import { UnaryMinus } from './node/expr/unaryMinus';
11-
import { UnaryPlus } from './node/expr/unaryPlus';
12-
import { BooleanNot } from './node/expr/booleanNot';
13-
import { BitwiseNot } from './node/expr/bitwiseNot';
10+
import { UnaryMinus } from './node/expr/unary-minus';
11+
import { UnaryPlus } from './node/expr/unary-plus';
12+
import { BooleanNot } from './node/expr/boolean-not';
13+
import { BitwiseNot } from './node/expr/bitwise-not';
1414

1515
// Binary operators
16-
import { BinaryOp } from './node/expr/binaryOp';
17-
import { Plus } from './node/expr/binaryOp/plus';
18-
import { Minus } from './node/expr/binaryOp/minus';
19-
import { Mul } from './node/expr/binaryOp/mul';
20-
import { Div } from './node/expr/binaryOp/div';
21-
import { Mod } from './node/expr/binaryOp/mod';
22-
import { Pow } from './node/expr/binaryOp/pow';
23-
import { Concat } from './node/expr/binaryOp/concat';
24-
import { BitwiseAnd } from './node/expr/binaryOp/bitwiseAnd';
25-
import { BitwiseOr } from './node/expr/binaryOp/bitwiseOr';
26-
import { BitwiseXor } from './node/expr/binaryOp/bitwiseXor';
27-
import { ShiftLeft } from './node/expr/binaryOp/shiftLeft';
28-
import { ShiftRight } from './node/expr/binaryOp/shiftRight';
29-
import { BooleanAnd } from './node/expr/binaryOp/booleanAnd';
30-
import { BooleanOr } from './node/expr/binaryOp/booleanOr';
31-
import { LogicalAnd } from './node/expr/binaryOp/logicalAnd';
32-
import { LogicalOr } from './node/expr/binaryOp/logicalOr';
33-
import { LogicalXor } from './node/expr/binaryOp/logicalXor';
34-
import { Equal } from './node/expr/binaryOp/equal';
35-
import { NotEqual } from './node/expr/binaryOp/notEqual';
36-
import { Identical } from './node/expr/binaryOp/identical';
37-
import { NotIdentical } from './node/expr/binaryOp/notIdentical';
38-
import { Greater } from './node/expr/binaryOp/greater';
39-
import { GreaterOrEqual } from './node/expr/binaryOp/greaterOrEqual';
40-
import { Smaller } from './node/expr/binaryOp/smaller';
41-
import { SmallerOrEqual } from './node/expr/binaryOp/smallerOrEqual';
42-
import { Spaceship } from './node/expr/binaryOp/spaceship';
43-
import { Coalesce } from './node/expr/binaryOp/coalesce';
16+
import { BinaryOp } from './node/expr/binary-op';
17+
import { Plus } from './node/expr/binary-op/plus';
18+
import { Minus } from './node/expr/binary-op/minus';
19+
import { Mul } from './node/expr/binary-op/mul';
20+
import { Div } from './node/expr/binary-op/div';
21+
import { Mod } from './node/expr/binary-op/mod';
22+
import { Pow } from './node/expr/binary-op/pow';
23+
import { Concat } from './node/expr/binary-op/concat';
24+
import { BitwiseAnd } from './node/expr/binary-op/bitwise-and';
25+
import { BitwiseOr } from './node/expr/binary-op/bitwise-or';
26+
import { BitwiseXor } from './node/expr/binary-op/bitwise-xor';
27+
import { ShiftLeft } from './node/expr/binary-op/shift-left';
28+
import { ShiftRight } from './node/expr/binary-op/shift-right';
29+
import { BooleanAnd } from './node/expr/binary-op/boolean-and';
30+
import { BooleanOr } from './node/expr/binary-op/boolean-or';
31+
import { LogicalAnd } from './node/expr/binary-op/logical-and';
32+
import { LogicalOr } from './node/expr/binary-op/logical-or';
33+
import { LogicalXor } from './node/expr/binary-op/logical-xor';
34+
import { Equal } from './node/expr/binary-op/equal';
35+
import { NotEqual } from './node/expr/binary-op/not-equal';
36+
import { Identical } from './node/expr/binary-op/identical';
37+
import { NotIdentical } from './node/expr/binary-op/not-identical';
38+
import { Greater } from './node/expr/binary-op/greater';
39+
import { GreaterOrEqual } from './node/expr/binary-op/greater-or-equal';
40+
import { Smaller } from './node/expr/binary-op/smaller';
41+
import { SmallerOrEqual } from './node/expr/binary-op/smaller-or-equal';
42+
import { Spaceship } from './node/expr/binary-op/spaceship';
43+
import { Coalesce } from './node/expr/binary-op/coalesce';
4444

4545
// Array
4646
import { Array_ } from './node/expr/array';
47-
import { ArrayItem } from './node/arrayItem';
47+
import { ArrayItem } from './node/array-item';
4848

4949
// ConstFetch
50-
import { ConstFetch } from './node/expr/constFetch';
50+
import { ConstFetch } from './node/expr/const-fetch';
5151

5252
// Ternary
5353
import { Ternary } from './node/expr/ternary';

src/index.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@ export { Token } from './token';
44
export { PhpParserError } from './error';
55
export { Comment, DocComment } from './comment';
66
export { Modifiers } from './modifiers';
7-
export { PhpVersion } from './phpVersion';
7+
export { PhpVersion } from './php-version';
88

99
// Interfaces
1010
export { Parser } from './parser';
11-
export { ErrorHandler, ThrowingErrorHandler, CollectingErrorHandler } from './errorHandler';
12-
export { NodeVisitor, NodeVisitorAbstract, DONT_TRAVERSE_CHILDREN, STOP_TRAVERSAL, REMOVE_NODE, DONT_TRAVERSE_CURRENT_AND_CHILDREN, REPLACE_WITH_NULL } from './nodeVisitor';
11+
export { ErrorHandler, ThrowingErrorHandler, CollectingErrorHandler } from './error-handler';
12+
export { NodeVisitor, NodeVisitorAbstract, DONT_TRAVERSE_CHILDREN, STOP_TRAVERSAL, REMOVE_NODE, DONT_TRAVERSE_CURRENT_AND_CHILDREN, REPLACE_WITH_NULL } from './node-visitor';
1313

1414
// Lexer
1515
export { Lexer } from './lexer';
1616

1717
// Parser
1818
export { Php8Parser } from './parser/php8';
19-
export { ParserFactory } from './parserFactory';
19+
export { ParserFactory } from './parser-factory';
2020

2121
// Traversal
22-
export { NodeTraverser } from './nodeTraverser';
23-
export { NodeDumper } from './nodeDumper';
24-
export { NodeFinder } from './nodeFinder';
22+
export { NodeTraverser } from './node-traverser';
23+
export { NodeDumper } from './node-dumper';
24+
export { NodeFinder } from './node-finder';
2525

2626
// Pretty Printer
27-
export { PrettyPrinter } from './prettyPrinter';
27+
export { PrettyPrinter } from './pretty-printer';
2828

2929
// Const Expression Evaluator
30-
export { ConstExprEvaluator } from './constExprEvaluator';
31-
export { ConstExprEvaluationException } from './constExprEvaluationException';
30+
export { ConstExprEvaluator } from './const-expr-evaluator';
31+
export { ConstExprEvaluationException } from './const-expr-evaluation-exception';
3232

3333
// Name Resolution
34-
export { NameContext } from './nameContext';
35-
export { NameResolver } from './nodeVisitor/nameResolver';
34+
export { NameContext } from './name-context';
35+
export { NameResolver } from './node-visitor/name-resolver';
3636

3737
// Node Visitors
38-
export { CloningVisitor } from './nodeVisitor/cloningVisitor';
38+
export { CloningVisitor } from './node-visitor/cloning-visitor';
3939

4040
// Token constants
41-
export * from './phpToken';
41+
export * from './php-token';
4242

4343
// Node types
4444
export { Expr } from './node/expr';
@@ -48,26 +48,26 @@ export { Name, FullyQualified, Relative } from './node/name';
4848
export { Identifier, VarLikeIdentifier } from './node/identifier';
4949
export { Param } from './node/param';
5050
export { Arg } from './node/arg';
51-
export { ComplexType } from './node/complexType';
52-
export { NullableType } from './node/nullableType';
53-
export { UnionType } from './node/unionType';
54-
export { IntersectionType } from './node/intersectionType';
55-
export { InterpolatedStringPart } from './node/interpolatedStringPart';
56-
export { MatchArm } from './node/matchArm';
57-
export { VariadicPlaceholder } from './node/variadicPlaceholder';
51+
export { ComplexType } from './node/complex-type';
52+
export { NullableType } from './node/nullable-type';
53+
export { UnionType } from './node/union-type';
54+
export { IntersectionType } from './node/intersection-type';
55+
export { InterpolatedStringPart } from './node/interpolated-string-part';
56+
export { MatchArm } from './node/match-arm';
57+
export { VariadicPlaceholder } from './node/variadic-placeholder';
5858
export { Attribute } from './node/attribute';
59-
export { AttributeGroup } from './node/attributeGroup';
59+
export { AttributeGroup } from './node/attribute-group';
6060
export { Const_ } from './node/const';
61-
export { PropertyHook } from './node/propertyHook';
62-
export { PropertyItem } from './node/propertyItem';
63-
export { UseItem } from './node/useItem';
64-
export { DeclareItem } from './node/declareItem';
65-
export { StaticVar } from './node/staticVar';
66-
export { ClosureUse } from './node/closureUse';
67-
export { ArrayItem } from './node/arrayItem';
61+
export { PropertyHook } from './node/property-hook';
62+
export { PropertyItem } from './node/property-item';
63+
export { UseItem } from './node/use-item';
64+
export { DeclareItem } from './node/declare-item';
65+
export { StaticVar } from './node/static-var';
66+
export { ClosureUse } from './node/closure-use';
67+
export { ArrayItem } from './node/array-item';
6868

6969
// Builders
70-
export { BuilderFactory } from './builderFactory';
70+
export { BuilderFactory } from './builder-factory';
7171
export { ClassBuilder } from './builder/class_';
7272
export { MethodBuilder } from './builder/method';
7373
export { FunctionBuilder } from './builder/function_';
@@ -78,5 +78,5 @@ export { NamespaceBuilder } from './builder/namespace_';
7878
export { ParamBuilder } from './builder/param';
7979
export { PropertyBuilder } from './builder/property';
8080
export { UseBuilder } from './builder/use_';
81-
export { EnumCaseBuilder } from './builder/enumCase';
82-
export { ClassConstBuilder } from './builder/classConst';
81+
export { EnumCaseBuilder } from './builder/enum-case';
82+
export { ClassConstBuilder } from './builder/class-const';

0 commit comments

Comments
 (0)