minor #32794 [Lock] Add return type to the new LockFactory (chalasr)

This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Add return type to the new LockFactory

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Let's leverage renaming to add a return type.

Commits
-------

489f36daa2 [Lock] Add return type to the new LockFactory
This commit is contained in:
Tobias Schultze 2019-07-29 17:01:46 +02:00
commit 66eb96408b

View File

@ -19,4 +19,15 @@ namespace Symfony\Component\Lock;
*/
class LockFactory extends Factory
{
/**
* Creates a lock for the given resource.
*
* @param string $resource The resource to lock
* @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
*/
public function createLock($resource, $ttl = 300.0, $autoRelease = true): Lock
{
return parent::createLock($resource, $ttl, $autoRelease);
}
}