@@ -12,38 +12,38 @@ class UnexpectedTokenException extends SourceException
12
12
/**
13
13
* @var string
14
14
*/
15
- private $ sExpected ;
15
+ private $ expected ;
16
16
17
17
/**
18
18
* @var string
19
19
*/
20
- private $ sFound ;
20
+ private $ found ;
21
21
22
22
/**
23
23
* @var 'literal'|'identifier'|'count'|'expression'|'search'|'custom'
24
24
*/
25
- private $ sMatchType ;
25
+ private $ matchType ;
26
26
27
27
/**
28
- * @param 'literal'|'identifier'|'count'|'expression'|'search'|'custom' $sMatchType
28
+ * @param 'literal'|'identifier'|'count'|'expression'|'search'|'custom' $matchType
29
29
* @param int<0, max> $lineNumber
30
30
*/
31
- public function __construct (string $ sExpected , string $ sFound , string $ sMatchType = 'literal ' , int $ lineNumber = 0 )
31
+ public function __construct (string $ expected , string $ found , string $ matchType = 'literal ' , int $ lineNumber = 0 )
32
32
{
33
- $ this ->sExpected = $ sExpected ;
34
- $ this ->sFound = $ sFound ;
35
- $ this ->sMatchType = $ sMatchType ;
36
- $ sMessage = "Token “ {$ sExpected }” ( {$ sMatchType }) not found. Got “ {$ sFound }”. " ;
37
- if ($ this ->sMatchType === 'search ' ) {
38
- $ sMessage = "Search for “ {$ sExpected }” returned no results. Context: “ {$ sFound }”. " ;
39
- } elseif ($ this ->sMatchType === 'count ' ) {
40
- $ sMessage = "Next token was expected to have {$ sExpected } chars. Context: “ {$ sFound }”. " ;
41
- } elseif ($ this ->sMatchType === 'identifier ' ) {
42
- $ sMessage = "Identifier expected. Got “ {$ sFound }” " ;
43
- } elseif ($ this ->sMatchType === 'custom ' ) {
44
- $ sMessage = \trim ("$ sExpected $ sFound " );
33
+ $ this ->expected = $ expected ;
34
+ $ this ->found = $ found ;
35
+ $ this ->matchType = $ matchType ;
36
+ $ message = "Token “ {$ expected }” ( {$ matchType }) not found. Got “ {$ found }”. " ;
37
+ if ($ this ->matchType === 'search ' ) {
38
+ $ message = "Search for “ {$ expected }” returned no results. Context: “ {$ found }”. " ;
39
+ } elseif ($ this ->matchType === 'count ' ) {
40
+ $ message = "Next token was expected to have {$ expected } chars. Context: “ {$ found }”. " ;
41
+ } elseif ($ this ->matchType === 'identifier ' ) {
42
+ $ message = "Identifier expected. Got “ {$ found }” " ;
43
+ } elseif ($ this ->matchType === 'custom ' ) {
44
+ $ message = \trim ("$ expected $ found " );
45
45
}
46
46
47
- parent ::__construct ($ sMessage , $ lineNumber );
47
+ parent ::__construct ($ message , $ lineNumber );
48
48
}
49
49
}
0 commit comments