Skip to content

Commit e32cbed

Browse files
wouterjnicolas-grekas
authored andcommitted
Add remaining missing return types to safe methods
1 parent 8ebbb35 commit e32cbed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ private function getLoaderPaths(string $name = null): array
305305
return $loaderPaths;
306306
}
307307

308-
private function getMetadata(string $type, mixed $entity)
308+
private function getMetadata(string $type, mixed $entity): mixed
309309
{
310310
if ('globals' === $type) {
311311
return $entity;

Command/LintCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function getFilesInfo(array $filenames): array
143143
return $filesInfo;
144144
}
145145

146-
protected function findFiles(string $filename)
146+
protected function findFiles(string $filename): iterable
147147
{
148148
if (is_file($filename)) {
149149
return [$filename];
@@ -172,7 +172,7 @@ private function validate(string $template, string $file): array
172172
return ['template' => $template, 'file' => $file, 'valid' => true];
173173
}
174174

175-
private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, array $files)
175+
private function display(InputInterface $input, OutputInterface $output, SymfonyStyle $io, array $files): int
176176
{
177177
return match ($this->format) {
178178
'txt' => $this->displayTxt($output, $io, $files),
@@ -205,7 +205,7 @@ private function displayTxt(OutputInterface $output, SymfonyStyle $io, array $fi
205205
return min($errors, 1);
206206
}
207207

208-
private function displayJson(OutputInterface $output, array $filesInfo)
208+
private function displayJson(OutputInterface $output, array $filesInfo): int
209209
{
210210
$errors = 0;
211211

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

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

Extension/WorkflowExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getMarkedPlaces(object $subject, bool $placesNameOnly = true, st
9999
* Use a string (the place name) to get place metadata
100100
* Use a Transition instance to get transition metadata
101101
*/
102-
public function getMetadata(object $subject, string $key, string|Transition $metadataSubject = null, string $name = null)
102+
public function getMetadata(object $subject, string $key, string|Transition $metadataSubject = null, string $name = null): mixed
103103
{
104104
return $this
105105
->workflowRegistry

0 commit comments

Comments
 (0)