Skip to content

Commit b2d6f39

Browse files
Merge branch '2.8' into 3.4
* 2.8: Consistently throw exceptions on a single line fix fopen calls Update .editorconfig
2 parents edda5a6 + 4cca41e commit b2d6f39

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

XPath/Extension/FunctionExtension.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ public function translateContains(XPathExpr $xpath, FunctionNode $function)
150150
$arguments = $function->getArguments();
151151
foreach ($arguments as $token) {
152152
if (!($token->isString() || $token->isIdentifier())) {
153-
throw new ExpressionErrorException(
154-
'Expected a single string or identifier for :contains(), got '
155-
.implode(', ', $arguments)
156-
);
153+
throw new ExpressionErrorException('Expected a single string or identifier for :contains(), got '.implode(', ', $arguments));
157154
}
158155
}
159156

@@ -173,10 +170,7 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function)
173170
$arguments = $function->getArguments();
174171
foreach ($arguments as $token) {
175172
if (!($token->isString() || $token->isIdentifier())) {
176-
throw new ExpressionErrorException(
177-
'Expected a single string or identifier for :lang(), got '
178-
.implode(', ', $arguments)
179-
);
173+
throw new ExpressionErrorException('Expected a single string or identifier for :lang(), got '.implode(', ', $arguments));
180174
}
181175
}
182176

XPath/Extension/HtmlExtension.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ public function translateLang(XPathExpr $xpath, FunctionNode $function)
158158
$arguments = $function->getArguments();
159159
foreach ($arguments as $token) {
160160
if (!($token->isString() || $token->isIdentifier())) {
161-
throw new ExpressionErrorException(
162-
'Expected a single string or identifier for :lang(), got '
163-
.implode(', ', $arguments)
164-
);
161+
throw new ExpressionErrorException('Expected a single string or identifier for :lang(), got '.implode(', ', $arguments));
165162
}
166163
}
167164

0 commit comments

Comments
 (0)