Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class FileMutexFactory extends MutexFactory |
||
14 | { |
||
15 | private string $mutexPath; |
||
16 | private int $directoryMode; |
||
17 | private ?int $fileMode; |
||
18 | |||
19 | /** |
||
20 | * @param string $mutexPath The directory to store mutex files. |
||
21 | * @param int $directoryMode The permission to be set for newly created directories. |
||
22 | * This value will be used by PHP {@see chmod()} function. No umask will be applied. Defaults to 0775, |
||
23 | * meaning the directory is read-writable by owner and group, but read-only for other users. |
||
24 | * @param int|null $fileMode The permission to be set for newly created mutex files. |
||
25 | * This value will be used by PHP {@see chmod()} function. No umask will be applied. |
||
26 | */ |
||
27 | 1 | public function __construct(string $mutexPath, int $directoryMode = 0775, int $fileMode = null) |
|
32 | } |
||
33 | |||
34 | 1 | public function create(string $name): MutexInterface |
|
39 |