Skip to content

Commit

Permalink
Auto commit for release 'develop' on 2024-11-17
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 17, 2024
1 parent 5b8a4ec commit 893f9c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/Console/AutoImports.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private function importFiles(string $directory, array $files): array
$this->importMessages = [];
$this->importWarnings = [];
}
Log::debug(sprintf('Collection of exit codes: %s', join(', ', array_values($exitCodes))));
Log::debug(sprintf('Collection of exit codes: %s', implode(', ', array_values($exitCodes))));

return $exitCodes;
}
Expand Down Expand Up @@ -222,6 +222,7 @@ private function importFile(string $directory, string $file): int
if (!$jsonFileExists && !$hasFallbackConfig) {
$this->error(sprintf('No JSON configuration found. Checked for both "%s" and "%s"', $jsonFile, $fallbackJsonFile));
app('log')->error(sprintf('Exit code is %s.', ExitCode::CANNOT_READ_CONFIG->name));

return ExitCode::CANNOT_READ_CONFIG->value;
}

Expand All @@ -236,6 +237,7 @@ private function importFile(string $directory, string $file): int
$message = sprintf('The importer can\'t import %s: could not decode the JSON in config file %s.', $importableFile, $jsonFile);
$this->error($message);
app('log')->error(sprintf('Exit code is %s.', ExitCode::CANNOT_PARSE_CONFIG->name));

return ExitCode::CANNOT_PARSE_CONFIG->value;
}
$configuration = Configuration::fromArray(json_decode(file_get_contents($jsonFile), true));
Expand All @@ -246,6 +248,7 @@ private function importFile(string $directory, string $file): int

// don't report this.
app('log')->debug(sprintf('Exit code is %s.', ExitCode::SUCCESS->name));

return ExitCode::SUCCESS->value;
}

Expand All @@ -270,6 +273,7 @@ private function importFile(string $directory, string $file): int
)
);
app('log')->debug(sprintf('Exit code is %s.', ExitCode::TOO_MANY_ERRORS_PROCESSING->name));

return ExitCode::TOO_MANY_ERRORS_PROCESSING->value;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function handle(): int
$exitCode = ExitCode::NOTHING_WAS_IMPORTED->value;
app('log')->error(sprintf('Exit code is %s.', ExitCode::NOTHING_WAS_IMPORTED->name));
}
if($exitCode === ExitCode::SUCCESS->value) {
if ($exitCode === ExitCode::SUCCESS->value) {
app('log')->debug(sprintf('Exit code is %s.', ExitCode::SUCCESS->name));
}

Expand Down

0 comments on commit 893f9c8

Please sign in to comment.