Skip to content

Commit c4d58c0

Browse files
committed
Fix a typo in Explain statement
Signed-off-by: William Desportes <[email protected]>
1 parent 1f7653d commit c4d58c0

11 files changed

Lines changed: 15 additions & 15 deletions

src/Statements/ExplainStatement.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ExplainStatement extends Statement
4949
*
5050
* @var string
5151
*/
52-
public $statemenetAlias;
52+
public $statementAlias;
5353

5454
/**
5555
* The connection identifier, if used.
@@ -108,20 +108,20 @@ public function parse(Parser $parser, TokensList $list)
108108
if ($state === 0) {
109109
if ($token->keyword === 'ANALYZE' && $miniState === 0) {
110110
$state = 1;
111-
$this->statemenetAlias = 'ANALYZE';
111+
$this->statementAlias = 'ANALYZE';
112112
} elseif (
113113
$token->keyword === 'EXPLAIN'
114114
|| $token->keyword === 'DESC'
115115
|| $token->keyword === 'DESCRIBE'
116116
) {
117117
$miniState = 1;
118-
$this->statemenetAlias = $token->keyword;
118+
$this->statementAlias = $token->keyword;
119119

120120
$lastIdx = $list->idx;
121121
$nextKeyword = $list->getNextOfTypeAndValue(Token::TYPE_KEYWORD, 'ANALYZE');
122122
if ($nextKeyword && $nextKeyword->keyword !== null) {
123123
$miniState = 2;
124-
$this->statemenetAlias .= ' ANALYZE';
124+
$this->statementAlias .= ' ANALYZE';
125125
} else {
126126
$list->idx = $lastIdx;
127127
}
@@ -184,7 +184,7 @@ public function parse(Parser $parser, TokensList $list)
184184

185185
public function build(): string
186186
{
187-
$str = $this->statemenetAlias;
187+
$str = $this->statementAlias;
188188

189189
if (count($this->options->options)) {
190190
$str .= ' ';

tests/data/parser/parseExplain.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@
10011001
"strict": false,
10021002
"errors": []
10031003
},
1004-
"statemenetAlias": "EXPLAIN",
1004+
"statementAlias": "EXPLAIN",
10051005
"connectionId": null,
10061006
"explainedTable": null,
10071007
"CLAUSES": [],

tests/data/parser/parseExplain1.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@
989989
"strict": false,
990990
"errors": []
991991
},
992-
"statemenetAlias": "ANALYZE",
992+
"statementAlias": "ANALYZE",
993993
"connectionId": null,
994994
"explainedTable": null,
995995
"CLAUSES": [],

tests/data/parser/parseExplain2.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
]
381381
},
382382
"bodyParser": null,
383-
"statemenetAlias": "DESC",
383+
"statementAlias": "DESC",
384384
"connectionId": null,
385385
"explainedTable": "tablename",
386386
"CLAUSES": [],

tests/data/parser/parseExplain3.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@
18101810
"strict": false,
18111811
"errors": []
18121812
},
1813-
"statemenetAlias": "EXPLAIN ANALYZE",
1813+
"statementAlias": "EXPLAIN ANALYZE",
18141814
"connectionId": null,
18151815
"explainedTable": null,
18161816
"CLAUSES": [],

tests/data/parser/parseExplain4.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@
10251025
"strict": false,
10261026
"errors": []
10271027
},
1028-
"statemenetAlias": "EXPLAIN",
1028+
"statementAlias": "EXPLAIN",
10291029
"connectionId": null,
10301030
"explainedTable": null,
10311031
"CLAUSES": [],

tests/data/parser/parseExplainErr.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@
416416
]
417417
},
418418
"bodyParser": null,
419-
"statemenetAlias": "EXPLAIN",
419+
"statementAlias": "EXPLAIN",
420420
"connectionId": null,
421421
"explainedTable": null,
422422
"CLAUSES": [],

tests/data/parser/parseExplainErr1.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@
912912
}
913913
]
914914
},
915-
"statemenetAlias": "ANALYZE",
915+
"statementAlias": "ANALYZE",
916916
"connectionId": null,
917917
"explainedTable": null,
918918
"CLAUSES": [],

tests/data/parser/parseExplainErr2.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@
416416
]
417417
},
418418
"bodyParser": null,
419-
"statemenetAlias": "EXPLAIN ANALYZE",
419+
"statementAlias": "EXPLAIN ANALYZE",
420420
"connectionId": null,
421421
"explainedTable": null,
422422
"CLAUSES": [],

tests/data/parser/parseExplainErr3.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398
]
399399
},
400400
"bodyParser": null,
401-
"statemenetAlias": "DESCRIBE",
401+
"statementAlias": "DESCRIBE",
402402
"connectionId": null,
403403
"explainedTable": "tablename",
404404
"CLAUSES": [],

0 commit comments

Comments
 (0)