Skip to content

Commit

Permalink
Unify file reading methods.
Browse files Browse the repository at this point in the history
Changelog excerpt:
- Unified the methods for reading files to a singular method.
  • Loading branch information
Maikuolan committed Sep 25, 2023
1 parent 6e24d5f commit 9e033f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function recursiveCommand(string $Command, callable $Callable): string
private function peMeta(string $File): string
{
return $this->recursiveCommand($File, function ($Params) {
$Data = $this->Loader->readFileContent($Params);
$Data = $this->Loader->readFile($Params);
$Returnable = '';
if (substr($Data, 0, 2) !== 'MZ') {
return $this->Loader->L10N->getString('cli_pe1') . "\n";
Expand Down Expand Up @@ -397,7 +397,7 @@ private function coexFile(string $Clean): string
if (filter_var($Params, FILTER_VALIDATE_URL)) {
$Data = $this->Loader->Request->request($Params);
} elseif (is_file($Params) && is_readable($Params)) {
$Data = $this->Loader->readFileContent($Params);
$Data = $this->Loader->readFile($Params);
}
if (empty($Data)) {
return $this->Loader->L10N->getString('response.Invalid data') . "\n";
Expand All @@ -424,7 +424,7 @@ private function hashFile(string $Clean): string
if (filter_var($Params, FILTER_VALIDATE_URL)) {
$Data = $this->Loader->Request->request($Params);
} elseif (is_file($Params) && is_readable($Params)) {
$Data = $this->Loader->readFileContent($Params);
$Data = $this->Loader->readFile($Params);
}
if (empty($Data)) {
return $this->Loader->L10N->getString('response.Invalid data') . "\n";
Expand Down

0 comments on commit 9e033f6

Please sign in to comment.