Merge branch '3.4' into 4.3
* 3.4: Fix some return type annotations.
This commit is contained in:
commit
1aba480c2d
@ -188,8 +188,6 @@ class JsonDescriptor extends Descriptor
|
||||
|
||||
/**
|
||||
* Writes data as json.
|
||||
*
|
||||
* @return array|string
|
||||
*/
|
||||
private function writeData(array $data, array $options)
|
||||
{
|
||||
|
@ -142,8 +142,6 @@ class XmlDescriptor extends Descriptor
|
||||
|
||||
/**
|
||||
* Writes DOM document.
|
||||
*
|
||||
* @return \DOMDocument|string
|
||||
*/
|
||||
private function writeDocument(\DOMDocument $dom)
|
||||
{
|
||||
|
@ -92,8 +92,6 @@ class JsonDescriptor extends Descriptor
|
||||
|
||||
/**
|
||||
* Writes data as json.
|
||||
*
|
||||
* @return array|string
|
||||
*/
|
||||
private function writeData(array $data, array $options)
|
||||
{
|
||||
|
@ -179,8 +179,6 @@ class XmlDescriptor extends Descriptor
|
||||
|
||||
/**
|
||||
* Writes DOM document.
|
||||
*
|
||||
* @return \DOMDocument|string
|
||||
*/
|
||||
private function writeDocument(\DOMDocument $dom)
|
||||
{
|
||||
|
@ -320,7 +320,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param int $position The position
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function eq($position)
|
||||
{
|
||||
@ -363,7 +363,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
* @param int $offset
|
||||
* @param int $length
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function slice($offset = 0, $length = null)
|
||||
{
|
||||
@ -377,7 +377,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param \Closure $closure An anonymous function
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function reduce(\Closure $closure)
|
||||
{
|
||||
@ -394,7 +394,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
/**
|
||||
* Returns the first node of the current selection.
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function first()
|
||||
{
|
||||
@ -404,7 +404,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
/**
|
||||
* Returns the last node of the current selection.
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function last()
|
||||
{
|
||||
@ -414,7 +414,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
/**
|
||||
* Returns the siblings nodes of the current selection.
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*/
|
||||
@ -430,7 +430,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
/**
|
||||
* Returns the next siblings nodes of the current selection.
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*/
|
||||
@ -446,7 +446,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
/**
|
||||
* Returns the previous sibling nodes of the current selection.
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
@ -462,7 +462,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
/**
|
||||
* Returns the parents nodes of the current selection.
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
*/
|
||||
@ -489,7 +489,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string|null $selector An optional CSS selector to filter children
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*
|
||||
* @throws \InvalidArgumentException When current node is empty
|
||||
* @throws \RuntimeException If the CssSelector Component is not available and $selector is provided
|
||||
@ -686,7 +686,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $xpath An XPath expression
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function filterXPath($xpath)
|
||||
{
|
||||
@ -707,7 +707,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $selector A CSS selector
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*
|
||||
* @throws \RuntimeException if the CssSelector Component is not available
|
||||
*/
|
||||
@ -724,7 +724,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $value The link text
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function selectLink($value)
|
||||
{
|
||||
@ -738,7 +738,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $value The image alt
|
||||
*
|
||||
* @return self A new instance of Crawler with the filtered list of nodes
|
||||
* @return static A new instance of Crawler with the filtered list of nodes
|
||||
*/
|
||||
public function selectImage($value)
|
||||
{
|
||||
@ -752,7 +752,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $value The button text
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
public function selectButton($value)
|
||||
{
|
||||
@ -951,7 +951,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string $xpath
|
||||
*
|
||||
* @return self
|
||||
* @return static
|
||||
*/
|
||||
private function filterRelativeXPath($xpath)
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ class NativeRequestHandler implements RequestHandlerInterface
|
||||
* This method is identical to {@link \Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray}
|
||||
* and should be kept as such in order to port fixes quickly and easily.
|
||||
*
|
||||
* @return array
|
||||
* @return mixed
|
||||
*/
|
||||
private static function fixPhpFilesArray($data)
|
||||
{
|
||||
@ -228,9 +228,7 @@ class NativeRequestHandler implements RequestHandlerInterface
|
||||
/**
|
||||
* Sets empty uploaded files to NULL in the given uploaded files array.
|
||||
*
|
||||
* @param mixed $data The file upload data
|
||||
*
|
||||
* @return array|null Returns the stripped upload data
|
||||
* @return mixed Returns the stripped upload data
|
||||
*/
|
||||
private static function stripEmptyFiles($data)
|
||||
{
|
||||
|
@ -348,13 +348,13 @@ class Store implements StoreInterface
|
||||
*
|
||||
* @param string $key The store key
|
||||
*
|
||||
* @return string The data associated with the key
|
||||
* @return string|null The data associated with the key
|
||||
*/
|
||||
private function load($key)
|
||||
{
|
||||
$path = $this->getPath($key);
|
||||
|
||||
return file_exists($path) ? file_get_contents($path) : false;
|
||||
return file_exists($path) ? file_get_contents($path) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user