Skip to content

Commit

Permalink
Extracted protected boot function
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Aug 5, 2024
1 parent c2bfffc commit 24ee8e5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/framework/src/Support/Filesystem/MediaFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ public function __construct(string $path)
{
parent::__construct($this->getNormalizedPath($path));

$this->length = $this->findContentLength();
$this->mimeType = $this->findMimeType();
$this->hash = $this->findHash();
$this->boot();
}

/**
Expand Down Expand Up @@ -183,4 +181,11 @@ protected function findHash(): string
{
return Filesystem::hash($this->getPath(), 'crc32');
}

protected function boot(): void
{
$this->length = $this->findContentLength();
$this->mimeType = $this->findMimeType();
$this->hash = $this->findHash();
}
}

0 comments on commit 24ee8e5

Please sign in to comment.