1 | <?php |
||
17 | class DirectoryLock extends LockAbstract |
||
18 | { |
||
19 | protected $dirname; |
||
20 | |||
21 | /** |
||
22 | * @param string $dirname |
||
23 | */ |
||
24 | public function __construct($dirname) |
||
30 | |||
31 | /** |
||
32 | * @param string $name |
||
33 | * @param bool $blocking |
||
34 | * @return bool |
||
35 | */ |
||
36 | 32 | protected function getLock($name, $blocking) |
|
40 | |||
41 | /** |
||
42 | * Release lock |
||
43 | * |
||
44 | * @param string $name name of lock |
||
45 | * @return bool |
||
46 | */ |
||
47 | 32 | public function releaseLock($name) |
|
58 | |||
59 | /** |
||
60 | * @param string $name |
||
61 | * @return string |
||
62 | */ |
||
63 | 32 | protected function getDirectoryPath($name) |
|
67 | |||
68 | /** |
||
69 | * Check if lock is locked |
||
70 | * |
||
71 | * @param string $name name of lock |
||
72 | * @return bool |
||
73 | */ |
||
74 | 14 | public function isLocked($name) |
|
82 | } |
||
83 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: