Skip to content

Commit

Permalink
Add remaining missing return types to safe methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj authored and nicolas-grekas committed Apr 24, 2023
1 parent 8ebbb35 commit e32cbed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ private function getLoaderPaths(string $name = null): array
return $loaderPaths;
}

private function getMetadata(string $type, mixed $entity)
private function getMetadata(string $type, mixed $entity): mixed
{
if ('globals' === $type) {
return $entity;
Expand Down
8 changes: 4 additions & 4 deletions Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private function getFilesInfo(array $filenames): array
return $filesInfo;
}

protected function findFiles(string $filename)
protected function findFiles(string $filename): iterable
{
if (is_file($filename)) {
return [$filename];
Expand Down Expand Up @@ -172,7 +172,7 @@ private function validate(string $template, string $file): array
return ['template' => $template, 'file' => $file, 'valid' => true];
}

private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, array $files)
private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, array $files): int
{
return match ($this->format) {
'txt' => $this->displayTxt($output, $io, $files),
Expand Down Expand Up @@ -205,7 +205,7 @@ private function displayTxt(OutputInterface $output, SymfonyStyle $io, array $fi
return min($errors, 1);
}

private function displayJson(OutputInterface $output, array $filesInfo)
private function displayJson(OutputInterface $output, array $filesInfo): int
{
$errors = 0;

Expand All @@ -224,7 +224,7 @@ private function displayJson(OutputInterface $output, array $filesInfo)
return min($errors, 1);
}

private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null)
private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null, GithubActionReporter $githubReporter = null): void
{
$line = $exception->getTemplateLine();

Expand Down
2 changes: 1 addition & 1 deletion Extension/WorkflowExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function getMarkedPlaces(object $subject, bool $placesNameOnly = true, st
* Use a string (the place name) to get place metadata
* Use a Transition instance to get transition metadata
*/
public function getMetadata(object $subject, string $key, string|Transition $metadataSubject = null, string $name = null)
public function getMetadata(object $subject, string $key, string|Transition $metadataSubject = null, string $name = null): mixed
{
return $this
->workflowRegistry
Expand Down

0 comments on commit e32cbed

Please sign in to comment.