Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / css-selector / XPath / XPathExpr.php
index 38ca295540071c63989141caf5e9e9a810bcb5b6..63e3ac36bf82026aa108a72bad95cc770e1d312b 100644 (file)
@@ -23,19 +23,8 @@ namespace Symfony\Component\CssSelector\XPath;
  */
 class XPathExpr
 {
-    /**
-     * @var string
-     */
     private $path;
-
-    /**
-     * @var string
-     */
     private $element;
-
-    /**
-     * @var string
-     */
     private $condition;
 
     /**
@@ -70,7 +59,7 @@ class XPathExpr
      */
     public function addCondition($condition)
     {
-        $this->condition = $this->condition ? sprintf('%s and (%s)', $this->condition, $condition) : $condition;
+        $this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
 
         return $this;
     }
@@ -114,7 +103,7 @@ class XPathExpr
      *
      * @return $this
      */
-    public function join($combiner, XPathExpr $expr)
+    public function join($combiner, self $expr)
     {
         $path = $this->__toString().$combiner;