@@ -203,10 +203,10 @@ as seconds) and ``isExpired()`` (which returns a boolean).
203203Automatically Releasing The Lock
204204~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205205
206- A Lock will be automatically released when the Lock object is destructed. This is
207- an implementation detail that will be important when Locks are shared between processes.
208- In the example below, the ``pcntl_fork() `` will create two processes and the Lock
209- will be released automatically as soon as one process finishes::
206+ Lock are automatically released when their Lock objects are destructed. This is
207+ an implementation detail that will be important when sharing Locks between
208+ processes. In the example below, ``pcntl_fork() `` creates two processes and the
209+ Lock will be released automatically as soon as one process finishes::
210210
211211 // ...
212212 $lock = $factory->createLock('report-generation', 3600);
@@ -215,7 +215,7 @@ will be released automatically as soon as one process finishes::
215215 }
216216
217217 $pid = pcntl_fork();
218- if ($pid == -1 ) {
218+ if (-1 === $pid ) {
219219 // Could not fork
220220 exit(1);
221221 } elseif ($pid) {
@@ -228,9 +228,9 @@ will be released automatically as soon as one process finishes::
228228 }
229229 // ...
230230
231- To disable this behavior, one needs to set the 3rd argument to the `` LockFactory::createLock() ``
232- to false . That will make the Lock acquired for 3600 seconds or until `` Lock::release() ``
233- is called.
231+ To disable this behavior, set to `` false `` the third argument of
232+ `` LockFactory::createLock() `` . That will make the lock acquired for 3600 seconds
233+ or until `` Lock::release() `` is called.
234234
235235The Owner of The Lock
236236---------------------
0 commit comments