This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
final class LockFile | |
{ | |
private const LOCK_EXTENSION = '.lock'; | |
private readonly string $fileName; | |
public function __construct(string $fileName, private readonly int $duration) | |
{ | |
$this->fileName = $fileName . self::LOCK_EXTENSION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
final class TempFile | |
{ | |
/** @var resource */ | |
private $fileHandle; | |
/** | |
* @param resource $fileHandle | |
*/ |