1 | <?php |
||
11 | class Lock |
||
12 | { |
||
13 | use \PHPDaemon\Traits\ClassWatchdog; |
||
14 | use \PHPDaemon\Traits\StaticObjectWatchdog; |
||
15 | |||
16 | protected $pool; |
||
17 | protected $timeout; |
||
18 | protected $token; |
||
19 | protected $key; |
||
20 | |||
21 | /** |
||
22 | * Constructor |
||
23 | * @param string $key |
||
24 | * @param integer $timeout |
||
25 | * @param Pool $pool |
||
26 | */ |
||
27 | public function __construct($key, $timeout, $pool) |
||
33 | |||
34 | /** |
||
35 | * @TODO |
||
36 | * @param integer $timeout |
||
37 | * @return this |
||
|
|||
38 | */ |
||
39 | public function timeout($timeout) |
||
44 | |||
45 | /** |
||
46 | * @TODO |
||
47 | * @param callable $cb |
||
48 | * @callback $cb ( ) |
||
49 | * @return this |
||
50 | */ |
||
51 | public function acquire($cb) |
||
61 | |||
62 | /** |
||
63 | * @TODO |
||
64 | * @param callable $cb |
||
65 | * @callback $cb ( ) |
||
66 | * @return this |
||
67 | */ |
||
68 | public function release($cb = null) |
||
84 | } |
||
85 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.