Completed
Push — master ( 2fb808...7b88cf )
by Richard
02:59
created
src/Parser/CssToXpath.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
 		$this->functionSet = $functionSet;
20 20
 
21 21
 		$this->translators = [
22
-			Tokenizer::WHITESPACE => function($string) use ($prefix) { return '//' . $prefix . $string;	},
23
-			'' => function($string) use ($prefix) { return '/' . $prefix . $string;	},
24
-			Tokenizer::GREATER_THAN => function($string) use ($prefix) { return '/' . $prefix  . $string; },
25
-			Tokenizer::NUM_SIGN => function($string) { return '[@id=\'' . $string . '\']'; },
26
-			Tokenizer::DOT => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' ' . $string . ' \')]'; },
27
-			Tokenizer::OPEN_SQUARE_BRACKET => function($string) use ($hash) { return '[' .'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \'' . json_encode($string) . '\', ., "' . $hash . '")' . ']';	}
22
+			Tokenizer::WHITESPACE => function($string) use ($prefix) { return '//'.$prefix.$string; },
23
+			'' => function($string) use ($prefix) { return '/'.$prefix.$string; },
24
+			Tokenizer::GREATER_THAN => function($string) use ($prefix) { return '/'.$prefix.$string; },
25
+			Tokenizer::NUM_SIGN => function($string) { return '[@id=\''.$string.'\']'; },
26
+			Tokenizer::DOT => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' '.$string.' \')]'; },
27
+			Tokenizer::OPEN_SQUARE_BRACKET => function($string) use ($hash) { return '['.'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \''.json_encode($string).'\', ., "'.$hash.'")'.']'; }
28 28
 		];
29 29
 	}
30 30
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		$functionSet->setElement($element[0]);
50 50
 
51 51
 		$attributes = array();
52
-        foreach($element[0]->attributes as $attribute_name => $attribute_node) {
52
+        foreach ($element[0]->attributes as $attribute_name => $attribute_node) {
53 53
             $attributes[$attribute_name] = $attribute_node->nodeValue;
54 54
         }
55 55
 
Please login to merge, or discard this patch.