Skip to content
Browse files

Utils: simplified

  • Loading branch information...
1 parent ad833ce commit 6d28e39915ec84ed517e1055373bb3822244bdb6 @juzna committed
Showing with 1 addition and 8 deletions.
  1. +1 −8 Nette/Utils/Tokenizer.php
View
9 Nette/Utils/Tokenizer.php
@@ -72,14 +72,7 @@ public function tokenize($input)
$count = count($this->types);
$line = 1;
foreach ($this->tokens as & $match) {
- $type = NULL;
- for ($i = 1; $i <= $count; $i++) {
- if (!isset($match[$i])) {
- break;
- } elseif ($match[$i] != NULL) {
- $type = $this->types[$i - 1]; break;
- }
- }
+ $type = $this->types[count($match) - 2];
$match = self::createToken($match[0], $type, $line);
$len += strlen($match['value']);
$line += substr_count($match['value'], "\n");

0 comments on commit 6d28e39

Please sign in to comment.
Something went wrong with that request. Please try again.