Skip to content

Commit

Permalink
fix: mark only some properties as readonly in SniffAgent
Browse files Browse the repository at this point in the history
The `$computedMimeType` property is not readonly, so don't mark the entire class as readonly.
  • Loading branch information
neoncitylights committed Apr 4, 2024
1 parent b3efd4e commit ae54e0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Sniff/SniffAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Neoncitylights\MediaType\MediaType;

final readonly class SniffAgent {
final class SniffAgent {
/**
* https://mimesniff.spec.whatwg.org/#computed-mime-type
*/
Expand All @@ -16,9 +16,9 @@
* @param bool $noSniffFlag https://mimesniff.spec.whatwg.org/#no-sniff-flag
*/
public function __construct(
public MediaType $suppliedMediaType,
public bool $checkForApacheFlag,
public bool $noSniffFlag
public readonly MediaType $suppliedMediaType,
public readonly bool $checkForApacheFlag,
public readonly bool $noSniffFlag
) {
$this->suppliedMediaType = $suppliedMediaType;
$this->computedMimeType = null;
Expand Down

0 comments on commit ae54e0d

Please sign in to comment.