Skip to content

Commit

Permalink
Merge branch '4.3' into 4.4
Browse files Browse the repository at this point in the history
* 4.3:
  Fix some return type annotations.
  • Loading branch information
nicolas-grekas committed Aug 7, 2019
2 parents 158482f + 1aba480 commit d3a7be8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ protected function describeContainerEnvVars(array $envs, array $options = [])

/**
* Writes data as json.
*
* @return array|string
*/
private function writeData(array $data, array $options)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ protected function describeContainerEnvVars(array $envs, array $options = [])

/**
* Writes DOM document.
*
* @return \DOMDocument|string
*/
private function writeDocument(\DOMDocument $dom)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/Console/Descriptor/JsonDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ protected function describeApplication(Application $application, array $options

/**
* Writes data as json.
*
* @return array|string
*/
private function writeData(array $data, array $options)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/Console/Descriptor/XmlDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent)

/**
* Writes DOM document.
*
* @return \DOMDocument|string
*/
private function writeDocument(\DOMDocument $dom)
{
Expand Down
32 changes: 16 additions & 16 deletions src/Symfony/Component/DomCrawler/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public function addNode(\DOMNode $node)
*
* @param int $position The position
*
* @return self
* @return static
*/
public function eq($position)
{
Expand Down Expand Up @@ -363,7 +363,7 @@ public function each(\Closure $closure)
* @param int $offset
* @param int $length
*
* @return self
* @return static
*/
public function slice($offset = 0, $length = null)
{
Expand All @@ -377,7 +377,7 @@ public function slice($offset = 0, $length = null)
*
* @param \Closure $closure An anonymous function
*
* @return self
* @return static
*/
public function reduce(\Closure $closure)
{
Expand All @@ -394,7 +394,7 @@ public function reduce(\Closure $closure)
/**
* Returns the first node of the current selection.
*
* @return self
* @return static
*/
public function first()
{
Expand All @@ -404,7 +404,7 @@ public function first()
/**
* Returns the last node of the current selection.
*
* @return self
* @return static
*/
public function last()
{
Expand All @@ -414,7 +414,7 @@ public function last()
/**
* Returns the siblings nodes of the current selection.
*
* @return self
* @return static
*
* @throws \InvalidArgumentException When current node is empty
*/
Expand All @@ -430,7 +430,7 @@ public function siblings()
/**
* Returns the next siblings nodes of the current selection.
*
* @return self
* @return static
*
* @throws \InvalidArgumentException When current node is empty
*/
Expand All @@ -446,7 +446,7 @@ public function nextAll()
/**
* Returns the previous sibling nodes of the current selection.
*
* @return self
* @return static
*
* @throws \InvalidArgumentException
*/
Expand All @@ -462,7 +462,7 @@ public function previousAll()
/**
* Returns the parents nodes of the current selection.
*
* @return self
* @return static
*
* @throws \InvalidArgumentException When current node is empty
*/
Expand All @@ -489,7 +489,7 @@ public function parents()
*
* @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
Expand Down Expand Up @@ -686,7 +686,7 @@ public function extract($attributes)
*
* @param string $xpath An XPath expression
*
* @return self
* @return static
*/
public function filterXPath($xpath)
{
Expand All @@ -707,7 +707,7 @@ public function filterXPath($xpath)
*
* @param string $selector A CSS selector
*
* @return self
* @return static
*
* @throws \RuntimeException if the CssSelector Component is not available
*/
Expand All @@ -724,7 +724,7 @@ public function filter($selector)
*
* @param string $value The link text
*
* @return self
* @return static
*/
public function selectLink($value)
{
Expand All @@ -738,7 +738,7 @@ public function selectLink($value)
*
* @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)
{
Expand All @@ -752,7 +752,7 @@ public function selectImage($value)
*
* @param string $value The button text
*
* @return self
* @return static
*/
public function selectButton($value)
{
Expand Down Expand Up @@ -949,7 +949,7 @@ public static function xpathLiteral($s)
*
* 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)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Symfony/Component/Form/NativeRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private static function getRequestMethod()
* 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)
{
Expand Down Expand Up @@ -228,9 +228,7 @@ private static function fixPhpFilesArray($data)
/**
* 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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpKernel/HttpCache/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,13 @@ private function doPurge(string $url)
/**
* 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)
{
$path = $this->getPath($key);

return file_exists($path) ? file_get_contents($path) : false;
return file_exists($path) ? file_get_contents($path) : null;
}

/**
Expand Down

0 comments on commit d3a7be8

Please sign in to comment.