minor #28719 Correct PHPDoc type for float ttl (Soullivaneuh)
This PR was merged into the 3.4 branch.
Discussion
----------
Correct PHPDoc type for float ttl
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
It can be null as the Lock instance accepts it.
It will fix that kind of PHPStan issue:
```
src/AppBundle/Command/AbstractCommand.php:45:Parameter #2 $ttl of method Symfony\Component\Lock\Factory::createLock() expects float, null given.
```
Commits
-------
b662e7eaf2
Correct PHPDoc type for float ttl
This commit is contained in:
commit
63d287b70c
@ -37,7 +37,7 @@ class Factory implements LoggerAwareInterface
|
|||||||
* Creates a lock for the given resource.
|
* Creates a lock for the given resource.
|
||||||
*
|
*
|
||||||
* @param string $resource The resource to lock
|
* @param string $resource The resource to lock
|
||||||
* @param float $ttl Maximum expected lock duration in seconds
|
* @param float|null $ttl Maximum expected lock duration in seconds
|
||||||
* @param bool $autoRelease Whether to automatically release the lock or not when the lock instance is destroyed
|
* @param bool $autoRelease Whether to automatically release the lock or not when the lock instance is destroyed
|
||||||
*
|
*
|
||||||
* @return Lock
|
* @return Lock
|
||||||
|
Reference in New Issue
Block a user