Completed
Push — master ( 49fd3e...ad9c66 )
by Tom
01:25
created
src/Parser/Tokenizer/Literals.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,8 +36,12 @@  discard block
 block discarded – undo
36 36
 			$n--;
37 37
 		}
38 38
 
39
-		if ($n == 0) return false;
40
-		if (in_array($str->read($n), ['(', "\n", ' ', '['])) return true;
39
+		if ($n == 0) {
40
+			return false;
41
+		}
42
+		if (in_array($str->read($n), ['(', "\n", ' ', '['])) {
43
+			return true;
44
+		}
41 45
 
42 46
 		return false;
43 47
 	}
@@ -51,9 +55,13 @@  discard block
 block discarded – undo
51 55
 	}
52 56
 
53 57
 	private function processLiterals($tokens, $name, $str) {
54
-		if (is_numeric($name)) $tokens->add(['type' => Tokenizer::NUMERIC, 'value' => $name]);
55
-		else if (method_exists($this, $name)) $this->$name($tokens);
56
-		else $tokens->add(['type' => Tokenizer::NAME, 'value' => $name, 'line' => $str->lineNo()]);
58
+		if (is_numeric($name)) {
59
+			$tokens->add(['type' => Tokenizer::NUMERIC, 'value' => $name]);
60
+		} else if (method_exists($this, $name)) {
61
+			$this->$name($tokens);
62
+		} else {
63
+			$tokens->add(['type' => Tokenizer::NAME, 'value' => $name, 'line' => $str->lineNo()]);
64
+		}
57 65
 	}
58 66
 
59 67
 	private function true($tokens) {
Please login to merge, or discard this patch.