minor #28460 Think positive (umpirsky)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #28460).
Discussion
----------
Think positive
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
No need to invert condition.
Commits
-------
0b43738162
Think positive
This commit is contained in:
commit
48acf9eef7
@ -69,10 +69,10 @@ final class Lock implements LockInterface, LoggerAwareInterface
|
||||
public function acquire($blocking = false)
|
||||
{
|
||||
try {
|
||||
if (!$blocking) {
|
||||
$this->store->save($this->key);
|
||||
} else {
|
||||
if ($blocking) {
|
||||
$this->store->waitAndSave($this->key);
|
||||
} else {
|
||||
$this->store->save($this->key);
|
||||
}
|
||||
|
||||
$this->dirty = true;
|
||||
|
Reference in New Issue
Block a user