From 489f36daa2a0f36a37792901f4d6603c4589e8c1 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Mon, 29 Jul 2019 12:49:22 +0200 Subject: [PATCH] [Lock] Add return type to the new LockFactory --- src/Symfony/Component/Lock/LockFactory.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Symfony/Component/Lock/LockFactory.php b/src/Symfony/Component/Lock/LockFactory.php index f054b532b5..2de93ce232 100644 --- a/src/Symfony/Component/Lock/LockFactory.php +++ b/src/Symfony/Component/Lock/LockFactory.php @@ -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); + } }