Skip to content

Commit ec569a2

Browse files
authored
Add missing types in the generator (#1503)
1 parent f246c55 commit ec569a2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/Command/GenerateCommand.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class GenerateCommand extends Command
3939
{
4040
protected static $defaultName = 'generate';
4141

42+
/**
43+
* @var array|null
44+
*/
4245
private $manifest;
4346

4447
/**
@@ -124,6 +127,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
124127
return 0;
125128
}
126129

130+
/**
131+
* @return array|int
132+
*/
127133
private function generateServicesParallel(SymfonyStyle $io, InputInterface $input, ConsoleOutputInterface $output, array $manifest, array $endpoints, array $serviceNames)
128134
{
129135
$progress = (new SymfonyStyle($input, $output->section()))->createProgressBar();
@@ -278,6 +284,9 @@ private function extractEndpointsForService(array $endpoints, string $prefix, st
278284
return $serviceEndpoints;
279285
}
280286

287+
/**
288+
* @return array|int
289+
*/
281290
private function generateService(SymfonyStyle $io, InputInterface $input, array $manifest, array $endpoints, string $serviceName)
282291
{
283292
$definitionArray = $this->loadFile($manifest['services'][$serviceName]['source'], "$serviceName-source", $manifest['services'][$serviceName]['patches']['source'] ?? []);

src/Definition/ServiceDefinition.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,39 @@ class ServiceDefinition
2020
*/
2121
private $name;
2222

23+
/**
24+
* @var array
25+
*/
2326
private $endpoints;
2427

28+
/**
29+
* @var array
30+
*/
2531
private $definition;
2632

33+
/**
34+
* @var array
35+
*/
2736
private $documentation;
2837

38+
/**
39+
* @var array
40+
*/
2941
private $pagination;
3042

43+
/**
44+
* @var array
45+
*/
3146
private $waiter;
3247

48+
/**
49+
* @var array
50+
*/
3351
private $example;
3452

53+
/**
54+
* @var array
55+
*/
3556
private $hooks;
3657

3758
/**

0 commit comments

Comments
 (0)