Prechádzať zdrojové kódy

[ZF-6280]Wrong return type

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17292 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 16 rokov pred
rodič
commit
e4946b6a7c
2 zmenil súbory, kde vykonal 29 pridanie a 29 odobranie
  1. 19 19
      library/Zend/Dom/Query.php
  2. 10 10
      library/Zend/Dom/Query/Css2Xpath.php

+ 19 - 19
library/Zend/Dom/Query.php

@@ -31,7 +31,7 @@ require_once 'Zend/Dom/Query/Result.php';
 
 /**
  * Query DOM structures based on CSS selectors and/or XPath
- * 
+ *
  * @package    Zend_Dom
  * @subpackage Query
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
@@ -60,8 +60,8 @@ class Zend_Dom_Query
 
     /**
      * Constructor
-     * 
-     * @param  null|string $document 
+     *
+     * @param  null|string $document
      * @return void
      */
     public function __construct($document = null)
@@ -71,8 +71,8 @@ class Zend_Dom_Query
 
     /**
      * Set document to query
-     * 
-     * @param  string $document 
+     *
+     * @param  string $document
      * @return Zend_Dom_Query
      */
     public function setDocument($document)
@@ -90,9 +90,9 @@ class Zend_Dom_Query
     }
 
     /**
-     * Register HTML document 
-     * 
-     * @param  string $document 
+     * Register HTML document
+     *
+     * @param  string $document
      * @return Zend_Dom_Query
      */
     public function setDocumentHtml($document)
@@ -104,8 +104,8 @@ class Zend_Dom_Query
 
     /**
      * Register XHTML document
-     * 
-     * @param  string $document 
+     *
+     * @param  string $document
      * @return Zend_Dom_Query
      */
     public function setDocumentXhtml($document)
@@ -117,8 +117,8 @@ class Zend_Dom_Query
 
     /**
      * Register XML document
-     * 
-     * @param  string $document 
+     *
+     * @param  string $document
      * @return Zend_Dom_Query
      */
     public function setDocumentXml($document)
@@ -130,7 +130,7 @@ class Zend_Dom_Query
 
     /**
      * Retrieve current document
-     * 
+     *
      * @return string
      */
     public function getDocument()
@@ -140,7 +140,7 @@ class Zend_Dom_Query
 
     /**
      * Get document type
-     * 
+     *
      * @return string
      */
     public function getDocumentType()
@@ -150,8 +150,8 @@ class Zend_Dom_Query
 
     /**
      * Perform a CSS selector query
-     * 
-     * @param  string $query 
+     *
+     * @param  string $query
      * @return Zend_Dom_Query_Result
      */
     public function query($query)
@@ -162,8 +162,8 @@ class Zend_Dom_Query
 
     /**
      * Perform an XPath query
-     * 
-     * @param  string $xpathQuery
+     *
+     * @param  string|array $xpathQuery
      * @param  string $query CSS selector query
      * @return Zend_Dom_Query_Result
      */
@@ -198,7 +198,7 @@ class Zend_Dom_Query
 
     /**
      * Prepare node list
-     * 
+     *
      * @param  DOMDocument $document
      * @param  string|array $xpathQuery
      * @return array

+ 10 - 10
library/Zend/Dom/Query/Css2Xpath.php

@@ -19,8 +19,8 @@
  */
 
 /**
- * Transform CSS selectors to XPath 
- * 
+ * Transform CSS selectors to XPath
+ *
  * @package    Zend_Dom
  * @subpackage Query
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
@@ -31,9 +31,9 @@ class Zend_Dom_Query_Css2Xpath
 {
     /**
      * Transform CSS expression to XPath
-     * 
-     * @param  string $path 
-     * @return string
+     *
+     * @param  string $path
+     * @return string|array
      */
     public static function transform($path)
     {
@@ -84,8 +84,8 @@ class Zend_Dom_Query_Css2Xpath
 
     /**
      * Tokenize CSS expressions to XPath
-     * 
-     * @param  string $expression 
+     *
+     * @param  string $expression
      * @return string
      */
     protected static function _tokenize($expression)
@@ -100,7 +100,7 @@ class Zend_Dom_Query_Css2Xpath
         // arbitrary attribute strict equality
         if (preg_match('|([a-z]+)\[([a-z0-9_-]+)=[\'"]([^\'"]+)[\'"]\]|i', $expression)) {
             $expression = preg_replace_callback(
-                '|([a-z]+)\[([a-z0-9_-]+)=[\'"]([^\'"]+)[\'"]\]|i', 
+                '|([a-z]+)\[([a-z0-9_-]+)=[\'"]([^\'"]+)[\'"]\]|i',
                 create_function(
                     '$matches',
                     'return $matches[1] . "[@" . strtolower($matches[2]) . "=\'" . $matches[3] . "\']";'
@@ -112,7 +112,7 @@ class Zend_Dom_Query_Css2Xpath
         // arbitrary attribute contains full word
         if (preg_match('|([a-z]+)\[([a-z0-9_-]+)~=[\'"]([^\'"]+)[\'"]\]|i', $expression)) {
             $expression = preg_replace_callback(
-                '|([a-z]+)\[([a-z0-9_-]+)~=[\'"]([^\'"]+)[\'"]\]|i', 
+                '|([a-z]+)\[([a-z0-9_-]+)~=[\'"]([^\'"]+)[\'"]\]|i',
                 create_function(
                     '$matches',
                     'return $matches[1] . "[contains(@" . strtolower($matches[2]) . ", \' $matches[3] \')]";'
@@ -124,7 +124,7 @@ class Zend_Dom_Query_Css2Xpath
         // arbitrary attribute contains specified content
         if (preg_match('|([a-z]+)\[([a-z0-9_-]+)\*=[\'"]([^\'"]+)[\'"]\]|i', $expression)) {
             $expression = preg_replace_callback(
-                '|([a-z]+)\[([a-z0-9_-]+)\*=[\'"]([^\'"]+)[\'"]\]|i', 
+                '|([a-z]+)\[([a-z0-9_-]+)\*=[\'"]([^\'"]+)[\'"]\]|i',
                 create_function(
                     '$matches',
                     'return $matches[1] . "[contains(@" . strtolower($matches[2]) . ", \'" . $matches[3] . "\')]";'