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