Completed
Push — master ( 0ada29...ecc437 )
by Richard
03:53 queued 11s
created
src/Parser/Tokens.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 			if ($token['type'] === $tokenType) $i++;
79 79
 			else $splitTokens[$i][] = $token;
80 80
 		}
81
-        return array_map(function ($tokens) {
81
+        return array_map(function($tokens) {
82 82
             return new Tokens($tokens);
83 83
         }, $splitTokens);
84 84
 		//return $splitTokens;
Please login to merge, or discard this patch.
src/Parser/CssToXpath.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 		$this->functionSet = $functionSet;
19 19
 
20 20
 		$this->translators = [
21
-			Tokenizer::WHITESPACE => function($string) use ($prefix) { return '//' . $prefix . $string;	},
22
-			'' => function($string) use ($prefix) { return '/' . $prefix . $string;	},
23
-			Tokenizer::GREATER_THAN => function($string) use ($prefix) { return '/' . $prefix  . $string; },
24
-			Tokenizer::NUM_SIGN => function($string) { return '[@id=\'' . $string . '\']'; },
25
-			Tokenizer::DOT => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' ' . $string . ' \')]'; },
26
-			Tokenizer::OPEN_SQUARE_BRACKET => function($string) use ($hash) { return '[' .'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \'' . base64_encode(serialize($string)) . '\', ., "' . $hash . '")' . ']';	}
21
+			Tokenizer::WHITESPACE => function($string) use ($prefix) { return '//'.$prefix.$string; },
22
+			'' => function($string) use ($prefix) { return '/'.$prefix.$string; },
23
+			Tokenizer::GREATER_THAN => function($string) use ($prefix) { return '/'.$prefix.$string; },
24
+			Tokenizer::NUM_SIGN => function($string) { return '[@id=\''.$string.'\']'; },
25
+			Tokenizer::DOT => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' '.$string.' \')]'; },
26
+			Tokenizer::OPEN_SQUARE_BRACKET => function($string) use ($hash) { return '['.'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \''.base64_encode(serialize($string)).'\', ., "'.$hash.'")'.']'; }
27 27
 		];
28 28
 	}
29 29
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		$functionSet->setElement($element[0]);
48 48
 
49 49
 		$attributes = array();
50
-        foreach($element[0]->attributes as $attribute_name => $attribute_node) {
50
+        foreach ($element[0]->attributes as $attribute_name => $attribute_node) {
51 51
             $attributes[$attribute_name] = $attribute_node->nodeValue;
52 52
         }
53 53
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		$tokens = [];
79 79
 
80 80
 		foreach ($css->splitOnToken(Tokenizer::GREATER_THAN) as $token) {
81
-			foreach ($token->trim() as $t) $tokens[]  = $t;
81
+			foreach ($token->trim() as $t) $tokens[] = $t;
82 82
 			$tokens[] = ['type' => Tokenizer::GREATER_THAN];
83 83
 		}
84 84
 		$tokens = new Tokens(array_slice($tokens, 0, -1));
Please login to merge, or discard this patch.