Completed
Push — master ( 9fb92e...1099f2 )
by Tom
02:18
created
src/Parser/Value.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -49,6 +49,10 @@  discard block
 block discarded – undo
49 49
 		return $result;	
50 50
 	}
51 51
 
52
+	/**
53
+	 * @param string $function
54
+	 * @param \DOMElement $element
55
+	 */
52 56
 	private function parseString($function, $element) {
53 57
 		$result = [];
54 58
 		if ($function && in_array($function[0], ['\'', '"'])) {
@@ -102,6 +106,9 @@  discard block
 block discarded – undo
102 106
 		else return call_user_func_array([$obj, $func], $params);
103 107
 	}
104 108
 
109
+	/**
110
+	 * @param string $remaining
111
+	 */
105 112
 	private function parseNextValue($remaining, $result, $element) {
106 113
 		if (strlen($remaining) > 0 && $remaining[0] == ',') $result = array_merge($result, $this->parse(trim(substr($remaining, 1)), $element));
107 114
 		return $result;
Please login to merge, or discard this patch.
src/Parser/StringExtractor.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
 			$end = strpos($str, '"', $pos+1);
24 24
 			if (!$end) break;
25 25
 			while ($str[$end-1] == '\\') $end = strpos($str, '"', $end+1);
26
-			$strings['$___STR' . ++$num] = substr($str, $pos, $end-$pos+1);
27
-			$str = substr_replace($str, '$___STR' . $num, $pos, $end-$pos+1);
26
+			$strings['$___STR'.++$num] = substr($str, $pos, $end-$pos+1);
27
+			$str = substr_replace($str, '$___STR'.$num, $pos, $end-$pos+1);
28 28
 		}
29 29
 
30 30
 		return [$str, $strings];
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,12 @@
 block discarded – undo
21 21
 		$strings = [];
22 22
 		while (isset($str[$pos]) && ($pos = strpos($str, '"', $pos)) !== false) {
23 23
 			$end = strpos($str, '"', $pos+1);
24
-			if (!$end) break;
25
-			while ($str[$end-1] == '\\') $end = strpos($str, '"', $end+1);
24
+			if (!$end) {
25
+				break;
26
+			}
27
+			while ($str[$end-1] == '\\') {
28
+				$end = strpos($str, '"', $end+1);
29
+			}
26 30
 			$strings['$___STR' . ++$num] = substr($str, $pos, $end-$pos+1);
27 31
 			$str = substr_replace($str, '$___STR' . $num, $pos, $end-$pos+1);
28 32
 		}
Please login to merge, or discard this patch.