Fix some return type annotations.

This commit is contained in:
Alexander M. Turek 2019-08-07 10:40:19 +02:00
parent c88d125701
commit 0a78dc0f6f
7 changed files with 20 additions and 30 deletions

View File

@ -179,8 +179,6 @@ class JsonDescriptor extends Descriptor
/**
* Writes data as json.
*
* @return array|string
*/
private function writeData(array $data, array $options)
{

View File

@ -132,8 +132,6 @@ class XmlDescriptor extends Descriptor
/**
* Writes DOM document.
*
* @return \DOMDocument|string
*/
private function writeDocument(\DOMDocument $dom)
{

View File

@ -92,8 +92,6 @@ class JsonDescriptor extends Descriptor
/**
* Writes data as json.
*
* @return array|string
*/
private function writeData(array $data, array $options)
{

View File

@ -179,8 +179,6 @@ class XmlDescriptor extends Descriptor
/**
* Writes DOM document.
*
* @return \DOMDocument|string
*/
private function writeDocument(\DOMDocument $dom)
{

View File

@ -334,7 +334,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param int $position The position
*
* @return self
* @return static
*/
public function eq($position)
{
@ -377,7 +377,7 @@ class Crawler implements \Countable, \IteratorAggregate
* @param int $offset
* @param int $length
*
* @return self
* @return static
*/
public function slice($offset = 0, $length = null)
{
@ -391,7 +391,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param \Closure $closure An anonymous function
*
* @return self
* @return static
*/
public function reduce(\Closure $closure)
{
@ -408,7 +408,7 @@ class Crawler implements \Countable, \IteratorAggregate
/**
* Returns the first node of the current selection.
*
* @return self
* @return static
*/
public function first()
{
@ -418,7 +418,7 @@ class Crawler implements \Countable, \IteratorAggregate
/**
* Returns the last node of the current selection.
*
* @return self
* @return static
*/
public function last()
{
@ -428,7 +428,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
*/
@ -444,7 +444,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
*/
@ -460,7 +460,7 @@ class Crawler implements \Countable, \IteratorAggregate
/**
* Returns the previous sibling nodes of the current selection.
*
* @return self
* @return static
*
* @throws \InvalidArgumentException
*/
@ -476,7 +476,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
*/
@ -501,7 +501,7 @@ class Crawler implements \Countable, \IteratorAggregate
/**
* Returns the children nodes of the current selection.
*
* @return self
* @return static
*
* @throws \InvalidArgumentException When current node is empty
*/
@ -664,7 +664,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param string $xpath An XPath expression
*
* @return self
* @return static
*/
public function filterXPath($xpath)
{
@ -685,7 +685,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
*/
@ -706,7 +706,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param string $value The link text
*
* @return self
* @return static
*/
public function selectLink($value)
{
@ -721,7 +721,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)
{
@ -735,7 +735,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param string $value The button text
*
* @return self
* @return static
*/
public function selectButton($value)
{
@ -937,7 +937,7 @@ class Crawler implements \Countable, \IteratorAggregate
*
* @param string $xpath
*
* @return self
* @return static
*/
private function filterRelativeXPath($xpath)
{

View File

@ -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)
{

View File

@ -350,13 +350,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;
}
/**