Skip to content

Commit 6d6e2f5

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: fixed @return when returning this or static override property constraints in child class [Console] improved code coverage of Command class Only count on arrays or countables to avoid warnings in PHP 7.2
2 parents e81e020 + 08e75c9 commit 6d6e2f5

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

Compiler/ServiceReferenceGraph.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function hasNode($id)
4545
*
4646
* @param string $id The id to retrieve
4747
*
48-
* @return ServiceReferenceGraphNode The node matching the supplied identifier
48+
* @return ServiceReferenceGraphNode
4949
*
5050
* @throws InvalidArgumentException if no node matches the supplied identifier
5151
*/
@@ -61,7 +61,7 @@ public function getNode($id)
6161
/**
6262
* Returns all nodes.
6363
*
64-
* @return ServiceReferenceGraphNode[] An array of all ServiceReferenceGraphNode objects
64+
* @return ServiceReferenceGraphNode[]
6565
*/
6666
public function getNodes()
6767
{

ContainerBuilder.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function getResources()
201201
*
202202
* @param ResourceInterface $resource A resource instance
203203
*
204-
* @return ContainerBuilder The current instance
204+
* @return $this
205205
*/
206206
public function addResource(ResourceInterface $resource)
207207
{
@@ -219,7 +219,7 @@ public function addResource(ResourceInterface $resource)
219219
*
220220
* @param ResourceInterface[] $resources An array of resources
221221
*
222-
* @return ContainerBuilder The current instance
222+
* @return $this
223223
*/
224224
public function setResources(array $resources)
225225
{
@@ -237,7 +237,7 @@ public function setResources(array $resources)
237237
*
238238
* @param object $object An object instance
239239
*
240-
* @return ContainerBuilder The current instance
240+
* @return $this
241241
*/
242242
public function addObjectResource($object)
243243
{
@@ -253,7 +253,7 @@ public function addObjectResource($object)
253253
*
254254
* @param \ReflectionClass $class
255255
*
256-
* @return ContainerBuilder The current instance
256+
* @return $this
257257
*/
258258
public function addClassResource(\ReflectionClass $class)
259259
{
@@ -276,7 +276,7 @@ public function addClassResource(\ReflectionClass $class)
276276
* @param string $extension The extension alias or namespace
277277
* @param array $values An array of values that customizes the extension
278278
*
279-
* @return ContainerBuilder The current instance
279+
* @return $this
280280
*
281281
* @throws BadMethodCallException When this ContainerBuilder is frozen
282282
* @throws \LogicException if the container is frozen
@@ -300,7 +300,7 @@ public function loadFromExtension($extension, array $values = array())
300300
* @param CompilerPassInterface $pass A compiler pass
301301
* @param string $type The type of compiler pass
302302
*
303-
* @return ContainerBuilder The current instance
303+
* @return $this
304304
*/
305305
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
306306
{

Definition.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function __construct($class = null, array $arguments = array())
6161
*
6262
* @param string|array $factory A PHP function or an array containing a class/Reference and a method to call
6363
*
64-
* @return Definition The current instance
64+
* @return $this
6565
*/
6666
public function setFactory($factory)
6767
{
@@ -90,7 +90,7 @@ public function getFactory()
9090
*
9191
* @param string $factoryClass The factory class name
9292
*
93-
* @return Definition The current instance
93+
* @return $this
9494
*
9595
* @deprecated since version 2.6, to be removed in 3.0.
9696
*/
@@ -124,7 +124,7 @@ public function getFactoryClass($triggerDeprecationError = true)
124124
*
125125
* @param string $factoryMethod The factory method name
126126
*
127-
* @return Definition The current instance
127+
* @return $this
128128
*
129129
* @deprecated since version 2.6, to be removed in 3.0.
130130
*/
@@ -144,7 +144,7 @@ public function setFactoryMethod($factoryMethod)
144144
* @param null|string $renamedId The new decorated service id
145145
* @param int $priority The priority of decoration
146146
*
147-
* @return Definition The current instance
147+
* @return $this
148148
*
149149
* @throws InvalidArgumentException In case the decorated service id and the new decorated service id are equals.
150150
*/
@@ -194,7 +194,7 @@ public function getFactoryMethod($triggerDeprecationError = true)
194194
*
195195
* @param string $factoryService The factory service id
196196
*
197-
* @return Definition The current instance
197+
* @return $this
198198
*
199199
* @deprecated since version 2.6, to be removed in 3.0.
200200
*/
@@ -230,7 +230,7 @@ public function getFactoryService($triggerDeprecationError = true)
230230
*
231231
* @param string $class The service class
232232
*
233-
* @return Definition The current instance
233+
* @return $this
234234
*/
235235
public function setClass($class)
236236
{
@@ -254,7 +254,7 @@ public function getClass()
254254
*
255255
* @param array $arguments An array of arguments
256256
*
257-
* @return Definition The current instance
257+
* @return $this
258258
*/
259259
public function setArguments(array $arguments)
260260
{
@@ -287,7 +287,7 @@ public function setProperty($name, $value)
287287
*
288288
* @param mixed $argument An argument
289289
*
290-
* @return Definition The current instance
290+
* @return $this
291291
*/
292292
public function addArgument($argument)
293293
{
@@ -302,7 +302,7 @@ public function addArgument($argument)
302302
* @param int $index
303303
* @param mixed $argument
304304
*
305-
* @return Definition The current instance
305+
* @return $this
306306
*
307307
* @throws OutOfBoundsException When the replaced argument does not exist
308308
*/
@@ -350,7 +350,7 @@ public function getArgument($index)
350350
*
351351
* @param array $calls An array of method calls
352352
*
353-
* @return Definition The current instance
353+
* @return $this
354354
*/
355355
public function setMethodCalls(array $calls = array())
356356
{
@@ -368,7 +368,7 @@ public function setMethodCalls(array $calls = array())
368368
* @param string $method The method name to call
369369
* @param array $arguments An array of arguments to pass to the method call
370370
*
371-
* @return Definition The current instance
371+
* @return $this
372372
*
373373
* @throws InvalidArgumentException on empty $method param
374374
*/
@@ -387,7 +387,7 @@ public function addMethodCall($method, array $arguments = array())
387387
*
388388
* @param string $method The method name to remove
389389
*
390-
* @return Definition The current instance
390+
* @return $this
391391
*/
392392
public function removeMethodCall($method)
393393
{
@@ -434,7 +434,7 @@ public function getMethodCalls()
434434
*
435435
* @param array $tags
436436
*
437-
* @return Definition the current instance
437+
* @return $this
438438
*/
439439
public function setTags(array $tags)
440440
{
@@ -471,7 +471,7 @@ public function getTag($name)
471471
* @param string $name The tag name
472472
* @param array $attributes An array of attributes
473473
*
474-
* @return Definition The current instance
474+
* @return $this
475475
*/
476476
public function addTag($name, array $attributes = array())
477477
{
@@ -497,7 +497,7 @@ public function hasTag($name)
497497
*
498498
* @param string $name The tag name
499499
*
500-
* @return Definition
500+
* @return $this
501501
*/
502502
public function clearTag($name)
503503
{
@@ -509,7 +509,7 @@ public function clearTag($name)
509509
/**
510510
* Clears the tags for this definition.
511511
*
512-
* @return Definition The current instance
512+
* @return $this
513513
*/
514514
public function clearTags()
515515
{
@@ -523,7 +523,7 @@ public function clearTags()
523523
*
524524
* @param string $file A full pathname to include
525525
*
526-
* @return Definition The current instance
526+
* @return $this
527527
*/
528528
public function setFile($file)
529529
{
@@ -571,7 +571,7 @@ public function isShared()
571571
*
572572
* @param string $scope Whether the service must be shared or not
573573
*
574-
* @return Definition The current instance
574+
* @return $this
575575
*
576576
* @deprecated since version 2.8, to be removed in 3.0.
577577
*/
@@ -611,7 +611,7 @@ public function getScope($triggerDeprecationError = true)
611611
*
612612
* @param bool $boolean
613613
*
614-
* @return Definition The current instance
614+
* @return $this
615615
*/
616616
public function setPublic($boolean)
617617
{
@@ -635,7 +635,7 @@ public function isPublic()
635635
*
636636
* @param bool $boolean
637637
*
638-
* @return Definition The current instance
638+
* @return $this
639639
*
640640
* @deprecated since version 2.7, will be removed in 3.0.
641641
*/
@@ -671,7 +671,7 @@ public function isSynchronized($triggerDeprecationError = true)
671671
*
672672
* @param bool $lazy
673673
*
674-
* @return Definition The current instance
674+
* @return $this
675675
*/
676676
public function setLazy($lazy)
677677
{
@@ -696,7 +696,7 @@ public function isLazy()
696696
*
697697
* @param bool $boolean
698698
*
699-
* @return Definition the current instance
699+
* @return $this
700700
*/
701701
public function setSynthetic($boolean)
702702
{
@@ -722,7 +722,7 @@ public function isSynthetic()
722722
*
723723
* @param bool $boolean
724724
*
725-
* @return Definition the current instance
725+
* @return $this
726726
*/
727727
public function setAbstract($boolean)
728728
{
@@ -800,7 +800,7 @@ public function getDeprecationMessage($id)
800800
*
801801
* @param callable $callable A PHP callable
802802
*
803-
* @return Definition The current instance
803+
* @return $this
804804
*/
805805
public function setConfigurator($callable)
806806
{

DefinitionDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function getArgument($index)
212212
* @param int $index
213213
* @param mixed $value
214214
*
215-
* @return DefinitionDecorator the current instance
215+
* @return $this
216216
*
217217
* @throws InvalidArgumentException when $index isn't an integer
218218
*/

0 commit comments

Comments
 (0)