Skip to content

Commit 2a07f4b

Browse files
committed
minor symfony#24312 [Lock] Add missing methods in LockInterface (jderusse)
This PR was merged into the 4.0-dev branch. Discussion ---------- [Lock] Add missing methods in LockInterface | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no (because 3.4 is not yet released) | Deprecations? | no | Tests pass? | yes | Fixed tickets | / | License | MIT | Doc PR | / Add methods to the LockInterface Commits ------- e66e538 Add missing methods in LockInterface
2 parents 7a9eb2c + e66e538 commit 2a07f4b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/Symfony/Component/Lock/Lock.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,15 @@ public function release()
133133
}
134134

135135
/**
136-
* @return bool
136+
* {@inheritdoc}
137137
*/
138138
public function isExpired()
139139
{
140140
return $this->key->isExpired();
141141
}
142142

143143
/**
144-
* Returns the remaining lifetime.
145-
*
146-
* @return float|null Remaining lifetime in seconds. Null when the lock won't expire.
144+
* {@inheritdoc}
147145
*/
148146
public function getRemainingLifetime()
149147
{

src/Symfony/Component/Lock/LockInterface.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,16 @@ public function isAcquired();
5656
* @throws LockReleasingException If the lock can not be released
5757
*/
5858
public function release();
59+
60+
/**
61+
* @return bool
62+
*/
63+
public function isExpired();
64+
65+
/**
66+
* Returns the remaining lifetime.
67+
*
68+
* @return float|null Remaining lifetime in seconds. Null when the lock won't expire.
69+
*/
70+
public function getRemainingLifetime();
5971
}

0 commit comments

Comments
 (0)