8000 Merge branch '4.3' into 4.4 · symfony/symfony@d3a7be8 · GitHub
[go: up one dir, main page]

Skip to content

Commit d3a7be8

Browse files
Merge branch '4.3' into 4.4
* 4.3: Fix some return type annotations.
2 parents 158482f + 1aba480 commit d3a7be8

File tree

7 files changed

+20
-30
lines changed

7 files changed

+20
-30
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ protected function describeContainerEnvVars(array $envs, array $options = [])
188188

189189
/**
190190
* Writes data as json.
191-
*
192-
* @return array|string
193191
*/
194192
private function writeData(array $data, array $options)
195193
{

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ protected function describeContainerEnvVars(array $envs, array $options = [])
142142

143143
/**
144144
* Writes DOM document.
145-
*
146-
* @return \DOMDocument|string
147145
*/
148146
private function writeDocument(\DOMDocument $dom)
149147
{

src/Symfony/Component/Console/Descriptor/JsonDescriptor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ protected function describeApplication(Application $application, array $options
9292

9393
/**
9494
* Writes data as json.
95-
*
96-
* @return array|string
9795
*/
9896
private function writeData(array $data, array $options)
9997
{

src/Symfony/Component/Console/Descriptor/XmlDescriptor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent)
179179

180180
/**
181181
* Writes DOM document.
182-
*
183-
* @return \DOMDocument|string
184182
*/
185183
private function writeDocument(\DOMDocument $dom)
186184
{

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public function addNode(\DOMNode $node)
320320
*
321321
* @param int $position The position
322322
*
323-
* @return self
323+
* @return static
324324
*/
325325
public function eq($position)
326326
{
@@ -363,7 +363,7 @@ public function each(\Closure $closure)
363363
* @param int $offset
364364
* @param int $length
365365
*
366-
* @return self
366+
* @return static
367367
*/
368368
public function slice($offset = 0, $length = null)
369369
{
@@ -377,7 +377,7 @@ public function slice($offset = 0, $length = null)
377377
*
378378
* @param \Closure $closure An anonymous function
379379
*
380-
* @return self
380+
* @return static
381381
*/
382382
public function reduce(\Closure $closure)
383383
{
@@ -394,7 +394,7 @@ public function reduce(\Closure $closure)
394394
/**
395395
* Returns the first node of the current selection.
396396
*
397-
* @return self
397+
* @return static
398398
*/
399399
public function first()
400400
{
@@ -404,7 +404,7 @@ public function first()
404404
/**
405405
* Returns the last node of the current selection.
406406
*
407-
* @return self
407+
* @return static
408408
*/
409409
public function last()
410410
{
@@ -414,7 +414,7 @@ public function last()
414414
/**
415415
* Returns the siblings nodes of the current selection.
416416
*
417-
* @return self
417+
* @return static
418418
*
419419
* @throws \InvalidArgumentException When current node is empty
420420
*/
@@ -430,7 +430,7 @@ public function siblings()
430430
/**
431431
* Returns the next siblings nodes of the current selection.
432432
*
433-
* @return self
433+
* @return static
434434
*
435435
* @throws \InvalidArgumentException When current node is empty
436436
*/
@@ -446,7 +446,7 @@ public function nextAll()
446446
/**
447447
* Returns the previous sibling nodes of the current selection.
448448
*
449-
* @return self
449+
* @return static
450450
*
451451
* @throws \InvalidArgumentException
452452
*/
@@ -462,7 +462,7 @@ public function previousAll()
462462
/**
463463
* Returns the parents nodes of the current selection.
464464
*
465-
* @return self
465+
* @return static
466466
*
467467
* @throws \InvalidArgumentException When current node is empty
468468
*/
@@ -489,7 +489,7 @@ public function parents()
489489
*
490490
* @param string|null $selector An optional CSS selector to filter children
491491
*
492-
* @return self
492+
* @return static
493493
*
494494
* @throws \InvalidArgumentException When current node is empty
495495
* @throws \RuntimeException If the CssSelector Component is not available and $selector is provided
@@ -686,7 +686,7 @@ public function extract($attributes)
686686
*
687687
* @param string $xpath An XPath expression
688688
*
689-
* @return self
689+
* @return static
690690
*/
691691
public function filterXPath($xpath)
692692
{
@@ -707,7 +707,7 @@ public function filterXPath($xpath)
707707
*
708708
* @param string $selector A CSS selector
709709
*
710-
* @return self
710+
* @return static
711711
*
712712
* @throws \RuntimeException if the CssSelector Component is not available
713713
*/
@@ -724,7 +724,7 @@ public function filter($selector)
724724
*
725725
* @param string $value The link text
726726
*
727-
* @return self
727+
* @return static
728728
*/
729729
public function selectLink($value)
730730
{
@@ -738,7 +738,7 @@ public function selectLink($value)
738738
*
739739
* @param string $value The image alt
740740
*
741-
* @return self A new instance of Crawler with the filtered list of nodes
741+
* @return static A new instance of Crawler with the filtered list of nodes
742742
*/
743743
public function selectImage($value)
744744
{
@@ -752,7 +752,7 @@ public function selectImage($value)
752752
*
753753
* @param string $value The button text
754754
*
755-
* @return self
755+
* @return static
756756
*/
757757
public function selectButton($value)
758758
{
@@ -949,7 +949,7 @@ public static function xpathLiteral($s)
949949
*
950950
* The XPath expression should already be processed to apply it in the context of each node.
951951
*
952-
* @return self
952+
* @return static
953953
*/
954954
private function filterRelativeXPath(string $xpath)
955955
{

src/Symfony/Component/Form/NativeRequestHandler.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private static function getRequestMethod()
192192
* This method is identical to {@link \Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray}
193193
* and should be kept as such in order to port fixes quickly and easily.
194194
*
195-
* @return array
195+
* @return mixed
196196
*/
197197
private static function fixPhpFilesArray($data)
198198
{
@@ -228,9 +228,7 @@ private static function fixPhpFilesArray($data)
228228
/**
229229
* Sets empty uploaded files to NULL in the given uploaded files array.
230230
*
231-
* @param mixed $data The file upload data
232-
*
233-
* @return array|null Returns the stripped upload data
231+
* @return mixed Returns the stripped upload data
234232
*/
235233
private static function stripEmptyFiles($data)
236234
{

src/Symfony/Component/HttpKernel/HttpCache/Store.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,13 @@ private function doPurge(string $url)
342342
/**
343343
* Loads data for the given key.
344344
*
345-
* @return string The data associated with the key
345+
* @return string|null The data associated with the key
346346
*/
347347
private function load(string $key)
348348
{
349349
$path = $this->getPath($key);
350350

351-
return file_exists($path) ? file_get_contents($path) : false;
351+
return file_exists($path) ? file_get_contents($path) : null;
352352
}
353353

354354
/**

0 commit comments

Comments
 (0)
0