| 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) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * Release lock |
||
| 51 | * |
||
| 52 | * @param string $name name of lock |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | 32 | public function releaseLock($name) |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @param string $name |
||
| 69 | * @return string |
||
| 70 | */ |
||
| 71 | 32 | protected function getDirectoryPath($name) |
|
| 75 | |||
| 76 | /** |
||
| 77 | * Check if lock is locked |
||
| 78 | * |
||
| 79 | * @param string $name name of lock |
||
| 80 | * @return bool |
||
| 81 | */ |
||
| 82 | 14 | public function isLocked($name) |
|
| 90 | } |
||
| 91 |
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: