Revision 1852
Added by darkviper almost 12 years ago
Token.php | ||
---|---|---|
126 | 126 |
* |
127 | 127 |
* @return string The string representation |
128 | 128 |
*/ |
129 |
static public function typeToString($type, $short = false, $line = -1)
|
|
129 |
public static function typeToString($type, $short = false, $line = -1)
|
|
130 | 130 |
{ |
131 | 131 |
switch ($type) { |
132 | 132 |
case self::EOF_TYPE: |
... | ... | |
169 | 169 |
$name = 'INTERPOLATION_END_TYPE'; |
170 | 170 |
break; |
171 | 171 |
default: |
172 |
throw new Twig_Error_Syntax(sprintf('Token of type "%s" does not exist.', $type), $line);
|
|
172 |
throw new LogicException(sprintf('Token of type "%s" does not exist.', $type));
|
|
173 | 173 |
} |
174 | 174 |
|
175 | 175 |
return $short ? $name : 'Twig_Token::'.$name; |
... | ... | |
183 | 183 |
* |
184 | 184 |
* @return string The string representation |
185 | 185 |
*/ |
186 |
static public function typeToEnglish($type, $line = -1)
|
|
186 |
public static function typeToEnglish($type, $line = -1)
|
|
187 | 187 |
{ |
188 | 188 |
switch ($type) { |
189 | 189 |
case self::EOF_TYPE: |
... | ... | |
213 | 213 |
case self::INTERPOLATION_END_TYPE: |
214 | 214 |
return 'end of string interpolation'; |
215 | 215 |
default: |
216 |
throw new Twig_Error_Syntax(sprintf('Token of type "%s" does not exist.', $type), $line);
|
|
216 |
throw new LogicException(sprintf('Token of type "%s" does not exist.', $type));
|
|
217 | 217 |
} |
218 | 218 |
} |
219 | 219 |
} |
Also available in: Unified diff
updated Twig template engine to stable version 1.11.1 step2