@@ -48,7 +48,7 @@ final class Tokenizer implements TokenizerInterface
4848
4949 private $ regex = '' ;
5050
51- private $ regexRequiresReassambly = false ;
51+ private $ regexRequiresReassembly = false ;
5252
5353 public function __construct ()
5454 {
@@ -108,13 +108,13 @@ public function tokenize(string $string) : Stack
108108
109109 public function registerToken (string $ class , string $ regex , int $ priority = null )
110110 {
111- $ token = new StdClass ();
111+ $ token = new stdClass ();
112112 $ token ->class = $ class ;
113113 $ token ->regex = $ regex ;
114114 $ token ->priority = $ priority ?? $ this ->getPriority ($ class );
115115
116116 $ this ->internalTokens [$ class ] = $ token ;
117- $ this ->regexRequiresReassambly = true ;
117+ $ this ->regexRequiresReassembly = true ;
118118 }
119119
120120 private function getMatchedToken (array $ matches ) : string
@@ -130,15 +130,15 @@ private function getMatchedToken(array $matches) : string
130130
131131 private function getRegex () : string
132132 {
133- if (!$ this ->regex || $ this ->regexRequiresReassambly ) {
133+ if (!$ this ->regex || $ this ->regexRequiresReassembly ) {
134134 $ regex = [];
135135
136136 foreach ($ this ->getQueue () as $ token ) {
137137 $ regex [] = "(?< $ token ->class > $ token ->regex ) " ;
138138 }
139139
140140 $ this ->regex = sprintf ('~(%s)~As ' , implode ('| ' , $ regex ));
141- $ this ->regexRequiresReassambly = false ;
141+ $ this ->regexRequiresReassembly = false ;
142142 }
143143
144144 return $ this ->regex ;
@@ -157,6 +157,6 @@ private function getQueue() : SplPriorityQueue
157157
158158 private function getPriority (string $ class ) : int
159159 {
160- return $ this ->internalTokens [$ class ] ?? 10 ;
160+ return $ this ->internalTokens [$ class ]-> priority ?? 10 ;
161161 }
162162}
0 commit comments