mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-11 01:14:06 +09:00
Updates to vendors etc
This commit is contained in:
@@ -47,12 +47,12 @@ class AttributeMatchingExtension extends AbstractExtension
|
||||
|
||||
public function translateEquals(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition(sprintf('%s = %s', $attribute, Translator::getXpathLiteral($value)));
|
||||
return $xpath->addCondition(\sprintf('%s = %s', $attribute, Translator::getXpathLiteral($value)));
|
||||
}
|
||||
|
||||
public function translateIncludes(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition($value ? sprintf(
|
||||
return $xpath->addCondition($value ? \sprintf(
|
||||
'%1$s and contains(concat(\' \', normalize-space(%1$s), \' \'), %2$s)',
|
||||
$attribute,
|
||||
Translator::getXpathLiteral(' '.$value.' ')
|
||||
@@ -61,7 +61,7 @@ class AttributeMatchingExtension extends AbstractExtension
|
||||
|
||||
public function translateDashMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition(sprintf(
|
||||
return $xpath->addCondition(\sprintf(
|
||||
'%1$s and (%1$s = %2$s or starts-with(%1$s, %3$s))',
|
||||
$attribute,
|
||||
Translator::getXpathLiteral($value),
|
||||
@@ -71,7 +71,7 @@ class AttributeMatchingExtension extends AbstractExtension
|
||||
|
||||
public function translatePrefixMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition($value ? sprintf(
|
||||
return $xpath->addCondition($value ? \sprintf(
|
||||
'%1$s and starts-with(%1$s, %2$s)',
|
||||
$attribute,
|
||||
Translator::getXpathLiteral($value)
|
||||
@@ -80,7 +80,7 @@ class AttributeMatchingExtension extends AbstractExtension
|
||||
|
||||
public function translateSuffixMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition($value ? sprintf(
|
||||
return $xpath->addCondition($value ? \sprintf(
|
||||
'%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s',
|
||||
$attribute,
|
||||
\strlen($value) - 1,
|
||||
@@ -90,7 +90,7 @@ class AttributeMatchingExtension extends AbstractExtension
|
||||
|
||||
public function translateSubstringMatch(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition($value ? sprintf(
|
||||
return $xpath->addCondition($value ? \sprintf(
|
||||
'%1$s and contains(%1$s, %2$s)',
|
||||
$attribute,
|
||||
Translator::getXpathLiteral($value)
|
||||
@@ -99,7 +99,7 @@ class AttributeMatchingExtension extends AbstractExtension
|
||||
|
||||
public function translateDifferent(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
|
||||
{
|
||||
return $xpath->addCondition(sprintf(
|
||||
return $xpath->addCondition(\sprintf(
|
||||
$value ? 'not(%1$s) or %1$s != %2$s' : '%s != %s',
|
||||
$attribute,
|
||||
Translator::getXpathLiteral($value)
|
||||
|
||||
Reference in New Issue
Block a user